Code: Select all
PhysWorld->getDispatcher()->dispatchAllCollisionPairs(Ghost->getOverlappingPairCache(), PhysWorld->getDispatchInfo(), PhysWorld->getDispatcher());
So I removed the comments for that line of code and tested it...with absolutely no change. I'm getting a large drop in performance for absolutely nothing. I snooped through the source code that was called, making one assumption, and one annoying conclusion.
On line 387 of btOverlappingPairCache.cpp it uses the provided callback to "processOverlap". On lines 236 and 238 of btCollisionDispatcher.cpp I see it is creating a btCollisionPairCallback to be used for the "processing". At lines 224 and 226 of btCollisionDispatcher.cpp, inside the "processOverlap" function it calls the dispatchers near callback and then is hardcoded to always return false. Which returns into this if statement:
Code: Select all
if (callback->processOverlap(*pair))
{
removeOverlappingPair(pair->m_pProxy0,pair->m_pProxy1,dispatcher);
gOverlappingPairs--;
} else
{
i++;
}
Is there any way to get it to clean it's cache of collisions that are AABB only(and not the actual shape) that doesn't involve modifying bullet source code?