Page 1 of 1

Checking for collisions involving a single object

Posted: Mon Jun 04, 2007 12:51 am
by btmorex
Is there a way to check collisions again against a single collision object?

It occurs to me that the way I'm resolving collisions could cause additional collisions. For example, if in a single time step an object collides with 2 other objects, resolving the second collision could cause another collision with the first object (which had already been resolved). Ideally, I'd like to resolve any collisions for a single object and then recheck it to make sure the resolution hasn't caused more collisions without checking for collisions in the whole world again. Is there a way to do this?

Thanks.

Posted: Mon Jun 04, 2007 1:15 am
by Erwin Coumans
Are you using Bullet?
I assumed so, so I moved your posting to the right forum.

Have you tried Bullet dynamics, are do you just use its collision detection?

Thanks,
Erwin

Posted: Mon Jun 04, 2007 1:20 am
by btmorex
Yes, I'm using Bullet and just the collisions part of it (no physics).

Posted: Tue Jun 19, 2007 5:58 am
by btmorex
Since there haven't been any more replies, I'm guessing this isn't possible yet. Right now, I'm calling performDiscreetCollisionDetection multiple times in each time step until there aren't any collisions detected (with a maximum number of attempts at which point I move an object back to a last known good position). This seems to work fine, but at this point I don't have that many collision objects in the world. As more are added, this might end up being too slow.

I saw this in the latest announcement though: "On the roadmap is better API for single swept collision query". Is this related to what I want to do?

Or does anyone have a better method for resolving collisions than what I'm doing right now?

Posted: Tue Jun 19, 2007 4:34 pm
by Erwin Coumans
btmorex wrote: I saw this in the latest announcement though: "On the roadmap is better API for single swept collision query". Is this related to what I want to do?
Yes, you will be able to query a single object, and just use fromTransform=toTransform to receive overlapping objects.
Or does anyone have a better method for resolving collisions than what I'm doing right now?
You can check what BulletDynamics is doing: it resolves penetrations/velocity constraints per group/island, not per single object.