DanielChappuis/reactphysics3d

CollisionDetectionSystem::createContacts() assert crash

darktemplar216 opened this issue · 2 comments

in void CollisionDetectionSystem::createContacts() {

by using triggers in the game, I found that the assertion below fails

for (uint32 p=0; p < nbContactPairsToProcess; p++) {
    uint32 contactPairIndex = mWorld->mProcessContactPairsOrderIslands[p];
    ContactPair& contactPair = (*mCurrentContactPairs)[contactPairIndex];
...
    
   assert(potentialManifold.nbPotentialContactPoints > 0);

After I went through the code, I think we are not generating contact points for the triggers. So I add a if() continue to prevents it from happenning.

for (uint32 p=0; p < nbContactPairsToProcess; p++) {
    uint32 contactPairIndex = mWorld->mProcessContactPairsOrderIslands[p];
    ContactPair& contactPair = (*mCurrentContactPairs)[contactPairIndex];
...
    
    if (contactPair.isTrigger)
    {
        continue;
    }

So far seems fine
Does it make any sense? Daniel

Hello. Thanks a lot for reporting this issue. I take some time to take a look and I think this is already fixed in the "develop" branch. This will be available in the next release of the library.

This is now fixed in version v0.10.0 of the library. Thanks a lot for reporting the issue.