Making an Actor "Jump"

Started by
3 comments, last by Torm3nt 21 years, 5 months ago
Hi again all. Many thanks to you that helped me on the set distance movement problem i had, now a new one I''m trying to make an actor jump, using this formula: a = a + (Cos(b) * (0.01 * T)) * b where: a = the total jump (in height) so far b = the height the jump has to reach T = time now, It''s half working. it seems the player does this in the jump: /\ not: .-. if that makes any sense. Any help would be greatly appreciated.
Advertisement
Well he should jump following a parabolic path rather than a cosine...

I''d use the formulae for motion with constant acceleration...

a = a

v = u + at (u = velocity at t=0), integrate above equation to get this result

r = ut + 0.5 * a * t * t

where r is the relative displacement from time t. Again, it''s the integral of the equation above.

Use the third formula, with a constant downwards (negative) acceleration (9.81 m/s or whatever). Set off with a velocity u (upwards) and then apply the 3rd equation until r becomes negative (under the floor). Bingo, and Newton would be happy.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
Thanks shifter, I''m a little when you say stuff like this though:

"v = u + at (u = velocity at t=0)"

when you say "at", what exactly do you mean?
He''s saying the initial velocity.
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
No, when he says "at" he really means a*t, where ''t'' is the time increment from the moment that the object had velocity ''u'' and ''a'' is the acceleration (assumed constant).

Cheers,

Timkin

This topic is closed to new replies.

Advertisement