Checking for collisions involving a single object

Post Reply
btmorex
Posts: 11
Joined: Wed May 23, 2007 12:58 am

Checking for collisions involving a single object

Post 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.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post 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
btmorex
Posts: 11
Joined: Wed May 23, 2007 12:58 am

Post by btmorex »

Yes, I'm using Bullet and just the collisions part of it (no physics).
btmorex
Posts: 11
Joined: Wed May 23, 2007 12:58 am

Post 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?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post 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.
Post Reply