[ODE] ODE and geom scales
Jon Watte
hplus-ode at mindcontrol.org
Fri Dec 17 09:22:05 MST 2004
> upForce = -Gravity * (DesiredHeight / distanceSoon) * BodyMass;
Btw: the 1/ relationship is less stable than a 1- relationship,
because it reacts harder to really deep penetrations. It will
not be stable unless you use a fixed time-step. But you should
be using a fixed time-step anyway, so that's probably not a
problem for you :-)
A more stable, less directly responding formulation is the
classic spring:
upForce = -Gravity * (DesiredHeight - distanceSoon) * BodyMass * SpringConstant;
if( upForce < 0 ) upForce = 0;
Cheers,
/ h+
More information about the ODE
mailing list