I'm looking for confirmation/clarification of how I think manifold contact points work. From testing and from what I've read, it seems that a manifold (btPersistentManifold) is created for 2 bodies as long as their aabb's overlap. I also understand that if the manifold has no contact points, the actual shapes are not overlapping. When the shapes *do* overlap, there are one or more (max 4) contact points, whose distance is less than 0. From my tests, when the objects move apart just slightly after overlapping, the contact points remain but now have a positive distance. The distance makes sense to me, but I'm just wondering why the contact points stick around for a bit until the objects' shapes are apparently beyond some threshold in distance apart. My guess is that this is what the collision shapes' margin is for; ie. the contact points will stick around as long as the shapes' margins overlap, even if the shapes themselves don't, presumably to provide a small buffer region so that contact points aren't removed prematurely in case of near future recollision.
Can anyone confirm this, or provide other explanations?
Contact point lifetime
-
- Posts: 168
- Joined: Tue Jan 04, 2011 11:47 pm
Re: Contact point lifetime
I suppose this would be the same reason to prevent penetration ?dphil wrote:I'm looking for confirmation/clarification of how I think manifold contact points work. From testing and from what I've read, it seems that a manifold (btPersistentManifold) is created for 2 bodies as long as their aabb's overlap. I also understand that if the manifold has no contact points, the actual shapes are not overlapping. When the shapes *do* overlap, there are one or more (max 4) contact points, whose distance is less than 0. From my tests, when the objects move apart just slightly after overlapping, the contact points remain but now have a positive distance. The distance makes sense to me, but I'm just wondering why the contact points stick around for a bit until the objects' shapes are apparently beyond some threshold in distance apart. My guess is that this is what the collision shapes' margin is for; ie. the contact points will stick around as long as the shapes' margins overlap, even if the shapes themselves don't, presumably to provide a small buffer region so that contact points aren't removed prematurely in case of near future recollision.
Can anyone confirm this, or provide other explanations?
-
- Posts: 149
- Joined: Fri Jun 24, 2011 8:53 am
Re: Contact point lifetime
I think it might also have some use in performance optimization. If a movement vector is shorter than the distance, then I suppose Bullet might just assume the movement is valid. I think I've seen a presentation about that and "preemptive contact point generation"... perhaps it also dealt with simulation stability.
Take this with some salt as I cannot guarantee correctness of anything in my message.
Take this with some salt as I cannot guarantee correctness of anything in my message.