Why does GImpact clear pt Cache every processCollision call?

Khanovich
Posts: 6
Joined: Thu May 15, 2014 6:28 am

Why does GImpact clear pt Cache every processCollision call?

Post by Khanovich »

I am currently working on an application that does collision tests on specific objects (rather than entire world).

We are trying to decide between using btGimpactConvexDecompositionShape() and btCompoundShape(). Our infrastructure is set up in a way such that btCollisionDispatch fetches the appropriate collision algorithm when we give it two objects to check for collisions. We then call processCollisions and work on the Manifold Array that is returned by these functions.

I noticed that btGimpactCollisionAgolrithm seems to clear the persistent manifold every time processCollisions is called, which causes jittering when resting on a surface of another object and deep penetration in certain other cases. If I comment out "clearCache()" from btGimpactCollisionAlgorithm::processCollision, I actually get desired behavior (from what I've seen so far), but I am concerned of the consequences of this. Is there a particular reason btGimpact has to clearCache() every time? This seems to go against the entire purpose of a persistent manifold.

As for btCompoundShape, I have noticed that the algorithm associated with this shape generates way too many contact points for our application. If there are any flags to reduce this appropriately, please let me know. Otherwise my main concern is the purpose of the "clearCache()" from bitGimpactCollisionAlgorithm.

Forgot to mention, we use our own solver and broadphase.