Do not generate contact in GJK algorithm if not needed
This commit is contained in:
parent
b6ad69b278
commit
2f60190942
|
@ -122,7 +122,6 @@ bool CapsuleVsConvexPolyhedronAlgorithm::testCollision(NarrowPhaseInfo* narrowPh
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
narrowPhaseInfo->overlappingPair->getLastFrameCollisionInfo().wasUsingSAT = false;
|
narrowPhaseInfo->overlappingPair->getLastFrameCollisionInfo().wasUsingSAT = false;
|
||||||
|
|
|
@ -207,8 +207,11 @@ GJKAlgorithm::GJKResult GJKAlgorithm::testCollision(NarrowPhaseInfo* narrowPhase
|
||||||
return GJKResult::INTERPENETRATE;
|
return GJKResult::INTERPENETRATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a new contact point
|
if (reportContacts) {
|
||||||
narrowPhaseInfo->addContactPoint(normal, penetrationDepth, pA, pB);
|
|
||||||
|
// Add a new contact point
|
||||||
|
narrowPhaseInfo->addContactPoint(normal, penetrationDepth, pA, pB);
|
||||||
|
}
|
||||||
|
|
||||||
return GJKResult::COLLIDE_IN_MARGIN;
|
return GJKResult::COLLIDE_IN_MARGIN;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user