[ODE] Damping without adding forces

Anton Savin anton at targem.ru
Mon Oct 25 14:07:51 MST 2004


Hi, all

I've just realized damping in my version of ODE, just by modifying
body's velicity in dxStepBody:

  // handle linear velocity
  for (j=0; j<3; j++)
  {

 // inserted code
      if( b->flags & dxBodyDamping )
          b->lvel[ j ] *= REAL( 1.0 ) - b->damping.linearDamping * h;
 // end of inserted code
          
      b->pos[j] += h * b->lvel[j];
  }

  The damping to angular velocity is applied similarly.


  The positive side of my damping is that it never produces jittering.

  The question is: If I apply forces, it affects solver, and it can increase
  stability. But I don't touch solver here, so is stability increased
  by my damping or not?

Thanks in advance,
Anton Savin



More information about the ODE mailing list