Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Vetern |
I’m trying to make a player jump in an arc with one imput (left or right in this case).
I couldn’t find a way to make the player move horizontally as he goes up and down (with gravity and jump_h as const), it only teleports or move just a little.
Hi, What node are you using for the player? I think the best option is to use KinematicBody2D with velocity of type Vector2() parameter, and in _input() check when an input is pressed. Then you modify both y and x velocity according to the key pressed, and set an animation. Yo can prevent user for using another key until the animation finished. If this is what you need i could give you a more elaborated example with code.
p7f | 2018-11-23 19:03