[ODE] rate for fixed timesteps

David McClurg dmcclurg at pandemicstudios.com.au
Sun Nov 10 22:04:43 2002


To avoid breaking through geometry or generating large collision penetration depths, you'll need use a step value which scales to your velocity.

  step = 1/60
  speed = length(vel)
  if (speed * step) > max_depth then
    step = max_depth / speed
  endif
  dWorldStep(world, step)

just make sure max_depth is less than the radius of your moving vehicle. ideally, it would be small enough not to visually notice either (eg. radius * 0.1f)

if you really want to use a fixed time step,

  step = max_depth / max_speed

-----Original Message-----
From: Daniel.Groll@t-online.de [mailto:Daniel.Groll@t-online.de]
Sent: Sunday, 10 November 2002 12:18 AM
To: ode@q12.org
Subject: [ODE] rate for fixed timesteps


I use fixed timesteps to run my car simulation game. With a rate of 60
Hz the simulation runs smooth and seemed to be stable but now with
further testing I encountered some stability problems when cars or
objects move fast. Sometimes they seem to break through geometry or
"caught" in geometry. Is this the cause of a relatively low rate of
world timesteps? Or are there other reasons for instability? At which
rates run phyiscs simulations in common?