[ODE] Collision detection of rapidly moving objects

Chris Campbell chris.campbell at l8tech.com
Mon Aug 26 21:27:02 2002


I have to disagree with a couple of things there ;)

> Take a smaller world step size. This should take care of the objects
moving at higher speeds.

Maybe it would, but this is like trying to fix precision problems by using
doubles instead of floats - it doesn't get at the real problem. That being
that ODE needs to have bodies penetrating in order to respond, ie. be
embedded after dWorldStep. And it's not always good enough to get just any
penetration: for the case of a ball hitting a thin wall (box?) for example,
reducing the timestep size may guarantee that the ball cannot pass through
the wall without generating a contact at some point, but it doesn't
guarantee that the contact will be on the correct side of the wall. You
might find that it passes through _and_ gets faster. What is really needed
is the first point of contact, and this is probably best found like you say
with a swept volume test, and assuming the body travels in a straight line
between timesteps.

> The method of predicting the new position using a temporary dWorldStep
(for all the collision objects) is expensive  since it has to evaluate and
solve the constraint matrices (LCP).

It's not so much predicting, as making corrections after each step. There
are no more or less calls to dWorldStep than with the standard loop... but
taking a smaller timestep size would surely give you a lot more. If anything
the expense is in the collision detection, since a swept volume has many
more potential collisions than a static body.