Impulse uses frame time?
by James Sayer · in Torque Game Builder · 07/28/2005 (8:21 pm) · 1 replies
Quick question about impulse: Does it factor in the delta frame time?
E.g. to make mario jump I would call this one time:
$mario.setImpulseForcePolar( 0, 20 )
But for a space shooter where the force is being applied every frame I should factor in time so that it remains framerate independant:
$ship.setImpulseForcePolar( %angle, 200 * deltaT ) ;
Is this correct? Thanks!
E.g. to make mario jump I would call this one time:
$mario.setImpulseForcePolar( 0, 20 )
But for a space shooter where the force is being applied every frame I should factor in time so that it remains framerate independant:
$ship.setImpulseForcePolar( %angle, 200 * deltaT ) ;
Is this correct? Thanks!
About the author
Associate Melv May
This has, of course, been rectified in the next release.
- Melv.