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.
Checking for collisions involving a single object
-
- Posts: 11
- Joined: Wed May 23, 2007 12:58 am
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
-
- Posts: 11
- Joined: Wed May 23, 2007 12:58 am
-
- Posts: 11
- Joined: Wed May 23, 2007 12:58 am
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?
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?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Yes, you will be able to query a single object, and just use fromTransform=toTransform to receive overlapping objects.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?
You can check what BulletDynamics is doing: it resolves penetrations/velocity constraints per group/island, not per single object.Or does anyone have a better method for resolving collisions than what I'm doing right now?