[ODE] Collision detection between placeable geoms that have no rigid body (please help me)!

David Walters hidden.asbestos at googlemail.com
Mon Apr 30 02:03:58 MST 2007


> Can I detect collisions between placeable geoms that have no rigid bodies?

Yes, you can do that - calling dCollide works with sets of geoms only
- it returns data that is usable by the physics solver as contact
constraints - but it's up to you to use the data like that (i.e.
create a contact joint between 2 bodies).

In case of geoms with no bodies you don't have anything to create
constraints between so you'll have to manually resolve the collision
by moving the geoms backwards (or whatever scheme you'd like to
employ).  Be warned though that the interaction between manually
moving geoms and those controlled by bodies could cause problems
especially if your back step causes further collisions.

> Or

> I need a rigid body that stops at the position where it collides.
> However when a rigid body collides, it bounces. I do not want it to bounce.
> Just want it to stop at the position where it collides.

If you look into how the contact parameters are setup you'll see that
there is a bounce co-efficient if you set this to zero you'll reduce
the amount of bounce but probably not eliminate it. Any body in motion
has energy that must be dissipated for it to come to rest - by default
this will result in some kind of bouncing or rolling motion so what
you're seeing is more physically correct than an instant stop.

However if you want to create an instant stop on collision then one
simple thing to try is to set all velocity, angular velocity, force
and torque vectors to zero. I hope that works for you but I think your
results will vary based on the rest of the scene.

Regards,
David Walters


More information about the ODE mailing list