I’m trying to simulate a parabolic jump on a player game object with kinematic rigidbody. I’ve found several solutions online, but they usually include the destination point, which is something I don’t have, since the player can change its speed in mid jump. The only parameter I have are the max jump height and the speed
do you want it to look physically correct or just move along parabollic trajectory?
A parabolic trajectory will be good enough. Maybe to make what I’m trying to perform more understandable, I’m trying to simulate the jumping buggy in Moon Patrol. As the buggy jumps, you can increase or decrease speed in mid air, which will change your final landing point.
Currently, It’s jumping at a constant y velocity which I reverse once a certain height is reached.
Then you should just split your horizontal and vertical movement. Calculate horizontal from speed and for vertical use initial speed and apply gravity every fixed frame. Combined, this will give you desired parabollic-like trajectory .
I’ll try that, thanks.
It worked just like I wanted it. Thanks a lot.
I know i’m a little late, but could you share your code snippet on how did you achieve it ?