Help with jumping code

I am currently working on a leap/dive function and got it somewhat working, but after a go it doesn’t seem to work.

1 Like

a thing you could do is just set the y coordinate slightly higher, then wait a bit, then slightly higher, then wait a bit and so on to achieve the looks of a jump.

well that might work, but its more tedious work and doesn’t work to help solve the problem of the main function stopping after a second use. the function works for this; it just doesn’t work twice for some unknown reason.(edit while writing, it seems to be random when it stops)

You’re overcomplicating it.


This is all you need in your function.

2 Likes

All I did is do Y acceleration for gravity lol, but maybe that won’t work so much if you dont have a floor for the sprite to land on

1 Like