compute velocity
by yong1pop · in Torque X 3D · 02/02/2010 (10:57 pm) · 4 replies
I want to know how to compute jump up height when I put down spece batton.I am a newb,thanks in advance for that.
#2
02/03/2010 (2:14 am)
I want to know when my character up to peak , show another animation at this time, could you tell me how to judge it? thanks in advance.
#3
If you assume the character's behaving like a projectile (ignoring drag, which means the result will be slightly off, since Torque does have aero drag), its vertical velocity is v0 + at where v0 is initial vertical velocity, a is the vertical acceleration (-20 in stock TGE) and t is time in seconds. You set that equal to 0 and solve for t to give you the time until the character reaches the peak of the jump.
Then you can schedule a function to be called with that amount of time delay - maybe cut it by a fraction to account for drag making the character peak before it would without drag.
02/08/2010 (11:41 am)
I'd simplify it and use an equation to tell me roughly when the character will reach the top of the jump.If you assume the character's behaving like a projectile (ignoring drag, which means the result will be slightly off, since Torque does have aero drag), its vertical velocity is v0 + at where v0 is initial vertical velocity, a is the vertical acceleration (-20 in stock TGE) and t is time in seconds. You set that equal to 0 and solve for t to give you the time until the character reaches the peak of the jump.
Then you can schedule a function to be called with that amount of time delay - maybe cut it by a fraction to account for drag making the character peak before it would without drag.
#4
02/08/2010 (10:26 pm)
thanx Daniel.
Torque Owner Trent