Filtering CompoundCompound collision contact points.
Posted: Thu May 15, 2014 6:40 am
Hi All,
I'm having an issue where I'm using bullet Narrow Phase collision detection on two btCompoundShape objects that were created using Bullet Convex Decomposition. Because bullet convex decomposition seems to be very liberal about how many convex hull's it creates, I'm having an issue where these objects are colliding and creating a ton of unnecessary contact points at their edges.
Basically, I have two btCompoundShapes defined as obj0Wrap and obj1Wrap, and my code looks like the following:
This is where the problem arises. When I traverse the manifoldArray I have over 99 entries in there, and almost all give valid contact points with some penetration during collisions. This seems to be unnecessary, as many of these contact points are redundant, as they are edges for nearby convex shapes from each of the compound parents.
Is there no built-in bullet method to prevent btCompoundShapes ConvexChildren from interacting with each other in such a manner? Are there any well known ways of dealing with filtering contact points?
Many thanks,
Khan
I'm having an issue where I'm using bullet Narrow Phase collision detection on two btCompoundShape objects that were created using Bullet Convex Decomposition. Because bullet convex decomposition seems to be very liberal about how many convex hull's it creates, I'm having an issue where these objects are colliding and creating a ton of unnecessary contact points at their edges.
Basically, I have two btCompoundShapes defined as obj0Wrap and obj1Wrap, and my code looks like the following:
Code: Select all
algo = dispatcher->findAlgorithm(&obj0Wrap, &obj1Wrap);
btManifoldResult contactPointResult(&obj0Wrap, &obj1Wrap);
bulletNPAlgorithm->processCollision(&obj0Wrap, &obj1Wrap, getPrimitive(0)->getWorld()->getBulletCollisionWorld()->getDispatchInfo(), &contactPointResult);
btManifoldArray manifoldArray;
bulletNPAlgorithm->getAllContactManifolds(manifoldArray);
Is there no built-in bullet method to prevent btCompoundShapes ConvexChildren from interacting with each other in such a manner? Are there any well known ways of dealing with filtering contact points?
Many thanks,
Khan