#good ways to author a jump, using velocity

1 messages · Page 1 of 1 (latest)

hushed marlin
#

so i got a player, when you press jump, it sets the y_speed to -0.50 the number is arbitrary,
then the next few frames the gravity variable, lowers that amount gradually until you fall down again.

It's simple, and it works. But if you wanted super fine control over a jump, like with a jump curve, how would you do that together with the rest which is velocity based?

karmic canopy
#

hard

#

are you sure you dont just want to find the jump height

hushed marlin
#

yeah sure, i was thinking of how you can visualize by a curve at the end, not neccesarily using a real curve

#

like in hollow night, you jump up, stay in the air still for some frames, and then fall down

#

like this kinda thing

#

this is just a brainstorm tool i guess. But how would you even go about creating this

karmic canopy
#

Ok if you want only a parabolic arc its easier

karmic canopy
#

Im too tired now but i can help you figure out the math tomorrow

#

Its fairly straightforward, its basically a "find ymax of a thrown ball" problem

#

But thats not the entire story because thats if you throw it from an elevated position h

#

You can however use this formula to figure out the whole thing

#

Theres an explanation here if you want to take a shot at figuring it out

karmic canopy
#

https://math.stackexchange.com/questions/222578/how-to-calculate-initial-jump-velocity-for-reaching-specific-height

i have unfortunately been caught up in something super important today so i hope this is enough help