[ODE] RE: Velocity Damping

Ruud van Gaal ruud at marketgraph.nl
Thu Mar 6 06:53:02 2003


> >> float angularVelocityDamp = .9;
> >> float torqueScale = (angularVelocityDamp - 1.0F) / timestep; const 
> >> dReal* angularVel = dBodyGetAngularVel (body); 
> dBodyAddTorque (body, 
> >> forceScale * angularVel [0], forceScale
> >> * angularVel [1], forceScale * angularVel [2]);
>
> > You use 'forceScale' instead of 'torqueScale' in that last 
> statement. 
...
> Sorry. That was not copy&pasted code. The original code I 
> used, does use the calculated torquescale.

Ok. In that case the plot thickens. At damp=0 and timestep=0.001 (1/1000th
sec) you get torqueScale=-1/0.001 = 1000. That's large. And also, I wouldn't
really know if an assumed angularVelocity (rad/s) can be used as torque
(Nm). You'd expect damp=1 to immediately stop the body from rotating, but
I'm not positive that doing a 1:1 velocity-torque conversion will do that
trick.
Try adding a scaling option to lower the numbers considerably.

Ruud