[ODE] Step size vs. frame rate + building ODE

Nate W coding at natew.com
Tue Nov 19 22:48:01 2002


On Tue, 19 Nov 2002, Niko Nevatie wrote:

> Can I use frame processing time to scale the step? E.g.:
> 
> dWorldStep(dWorldID, 0.05 * scaler);
> 
> where scaler is somehow dependent of the frame processing time

That's what I do in Juice, and I'm happy with the results.  I also clamp
the 'frame time' to within a minimum and maximum range, to avoid getting
instabilities with large frame times or divide-by-zero with a zero frame
time.  If you check the archives, I wrote something a while back that goes
into more detail.

I like the variable time step approach for my app so far.  Theoretically
there are some potential problems with variable time steps, but in
practice I'm happy with the way things work in Juice.  

If repeatability or consistency across network machines is important, you
might want to use fixed time steps.

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com