[ODE] Swept collisions?

nlin at nlin.net nlin at nlin.net
Wed Oct 1 11:13:01 MST 2003


On Tue, Sep 30, 2003 at 03:26:25AM -0600, Dave Kerr wrote:
> Perhaps a flag on objects, like the NoGravity flag, have a CollisionSweep
> flag.  Not every object needs it, and only those at a high velocity.  The
> pendulum example is a good one, but the high velocity objects that really do
> move in a straight line, even in short time steps.
> 
> I think a good starting point is the sphere class.  Create a cylinder out of
> its trajectory and find the collision.

I still have some uncertainty about how such a scheme would work. Let's
take a somewhat representative example of a ragdoll character being shot at
by a spherical bullet. Since the ragdoll is articulated, you can't (easily)
create a sweep volume representing its timestep over one frame, but you can do
this with the bullet. 

So we would in this case be trying to collide a sphere sweep volume with
a non-swept ragdoll. The best we could do is to take the new position of
all bodies in the ragdoll and collide all of them with the sweep volume.
However it is still possible for the ragdoll to "tunnel" through the sweep
volume, since the ragdoll itself is not swept.

Just by thinking about it, I can't decide if sweeping one body but not
sweeping the other will actually help any "tunneling" situations in practice.
I guess you would have to run some tests with the actual geometry.

One possibility is to use multiple collision representations for an objects.
For instance, the ragdoll would use its full (articulated) set of rigid bodies
when colliding with the environment, so that it falls down stairs
realistically. For collision with bullets, you could use a simpler
bounding box representation for the ragdoll, which could then be swept and
collided with the sweep volume from the bullet (with the corresponding
increase in false-hits, of course). Also the bounding box of the entire
ragdoll would need to be dynamically computed since it changes each frame
depending on where the limbs are.

However, I don't know if this idea of "multiple collision representations
per object, some of which may be swept" is best solved within ODE itself or
at the application level.

-Norman


More information about the ODE mailing list