[ODE] question

Gopi Prashanth gprashanth at Heavy-Iron.com
Mon Aug 22 12:48:15 MST 2005


Why dont you use impulse, at the start of applying the force, calculate
impulse...

It = force * time

At every time step... do a F*dt  and calculate Delta Impulse... dI, keeping
track that your total impulse is under check

So your loop is something like this...

//Initialize
It = F * t;//total
Ic = 0; //count

//Every step
dI = F * dt;
if(Ic < It)
  Apply min of (It-Ic) or dI
Ic += dI

This will make sure you are applying a force alright, but make sure you do
not over shoot your intended time of applying the force.



-----Original Message-----
From: Alex Brown [mailto:abrown28 at gmail.com]
Sent: Monday, August 22, 2005 12:29 PM
To: ode at q12.org
Subject: [ODE] question


How do I apply a linear force for a specific period of time in such a way 
that it will be independent of the timestep? Right now I apply the force 
until my accumulated time between steps exceeds the time I wish to apply the

force. My timestep is dependent on my framerate so if there is a hiccup the 
force could be applied too long.


More information about the ODE mailing list