I have tried to read collision information by applying the same strategy that I'm using far collision between rigid bodies, i.e. by calling the m_broadphase->getOverlappingPairCache()->findPair(pair.m_pProxy0,pair.m_pProxy1) method.
However, it seens that the size of the manifoldArray is zero.
Code: Select all
btManifoldArray manifoldArray;
btBroadphasePairArray& pairArray = m_ghostObject->getOverlappingPairCache()->getOverlappingPairArray();
int numPairs = pairArray.size();
for (int i=0;i<numPairs;i++)
{
manifoldArray.clear();
const btBroadphasePair& pair = pairArray[i];
btBroadphasePair* collisionPair = m_broadphase->getOverlappingPairCache()->findPair(pair.m_pProxy0,pair.m_pProxy1);
if (!collisionPair)
continue;
if (collisionPair->m_algorithm)
collisionPair->m_algorithm->getAllContactManifolds(manifoldArray);
for (int j=0;j<manifoldArray.size();j++){
........
Code: Select all
btBroadphasePair* collisionPair = m_broadphase->getOverlappingPairCache()->getOverlappingPairArrayPtr();
In summary I don't understand the difference between findPair() and getOverlappingPairArrayPtr().