[ODE] gravity issues

Jon Watte hplus-ode at mindcontrol.org
Mon Nov 22 10:34:56 MST 2004


> What can i do to make the simulation work properly in the presence of 
> real gravity?

Make sure you have a fixed time step -- the argument to dWorldStep() 
should always be the same (say, 0.01f or so).

Also, add a little bit of damping. Each frame, for each body, get the 
velocity of each box, and add a force that's -0.02*Mass*Vel; get the 
angular vel and add torque that's -0.02*Mass*AVel. (You can tweak the 
0.02 constant, of course).

Last, turn on object auto-disable, for very still objects.

I have stacks of at least a hundred boxes (in a pyramid) be stable with 
these simple techniques.

Cheers,

			/ h+




More information about the ODE mailing list