Hi everyone, This may be a simple question but could someone give me some advice as to how to implement a long jump? So in other words I want the player to be able to hit a key on the keyboard and it launch them a certain distance. I have the ability to jump up implemented currently but I want something that would allow for more distance to be covered.
I attempted something like
if Input.is_key_pressed(KEY_TAB) and Input.is_action_pressed("ui_left"):
velocity.y = -400
velocity.x = -2000
where velocity is a Vector2(). I believe I have the movement down but the motion isn't quite right. What I mean by this is that my 2d sprite seems to move along the x axis first and then along the y axis and I want something where it moves along the y axis first and then along the x axis so that it appears more curved and natural.
Anyway, Thanks for taking the time to read this and I appreciate any and all the help!