[ODE] Making simulation speed independant from computer speed

Jon Watte hplus-ode at mindcontrol.org
Wed Nov 10 16:35:33 MST 2004


> My first question is : what is the unit of the stepsize ?

ODE uses whatever CONSISTENT unit system you want. The three  basic 
units are distance, time, and mass. If you want distance to be furlongs 
and mass to be stone, then the actual time unit used can be derived 
from that.

If you use SI units, then the unit of WorldStep is seconds, an mass is 
kilograms, and distance is meters (so velocity is meters per second).

> My second : what kind of calcul should I do to make the simulation speed 
> being the same on others computers, for example if I get the time 
> elapsed in millisecond.

It's usually a bad idea to use variable time steps. Instead, you should 
run more time steps in succession if you find more time has elapsed. 
If you vary the time step size, your simulations will not be as stable 
as with a fixed time step.

See http://www.mindcontrol.org/~hplus/graphics/game_loop.html for more.

Cheers,

			/ h+




More information about the ODE mailing list