Fix for issue79

This commit is contained in:
Daniel Chappuis 2019-03-01 17:34:31 +01:00
parent 061469a539
commit 95210623e3

View File

@ -599,7 +599,8 @@ bool SATAlgorithm::testCollisionConvexPolyhedronVsConvexPolyhedron(NarrowPhaseIn
}
// If the shapes were overlapping on the previous axis and still seem to overlap in this frame
if (lastFrameCollisionInfo->wasColliding && penetrationDepth > decimal(0.0)) {
if (lastFrameCollisionInfo->wasColliding && penetrationDepth > decimal(0.0) &&
penetrationDepth < DECIMAL_LARGEST) {
// Compute the closest points between the two edges (in the local-space of poylhedron 2)
Vector3 closestPointPolyhedron1Edge, closestPointPolyhedron2Edge;