[ODE] continuous forces w/ constant step size

Adam D. Moss adam at gimp.org
Fri Sep 17 09:38:50 MST 2004


Tyler Streeter wrote:
> void PhysicsEngine::step(dReal dt)
> {
>    timeAccumulation += dt;
> 
>    while (dt >= STEP_SIZE)
>    {
>       //step ODE ahead by a constant value
>       ODESystem.step(STEP_SIZE);
>    }
> }

I don't have an answer to your other questions, but I'm
pretty sure this shouldn't be working.  ITYM:

  void PhysicsEngine::step(dReal dt)
  {
     timeAccumulation += dt;

     while (timeAccumulation >= STEP_SIZE)
    {
        //step ODE ahead by a constant value
        ODESystem.step(STEP_SIZE);
        timeAccumulation -= STEP_SIZE;
    }
  }


More information about the ODE mailing list