Fix issue in GJK algorithm when numerical issue occurs

This commit is contained in:
Daniel Chappuis 2017-09-07 22:23:00 +02:00
parent dd91f6dcbf
commit 1b82a3e228

View File

@ -198,7 +198,7 @@ GJKAlgorithm::GJKResult GJKAlgorithm::testCollision(NarrowPhaseInfo* narrowPhase
// If the penetration depth is negative (due too numerical errors), there is no contact
if (penetrationDepth <= decimal(0.0)) {
return GJKResult::INTERPENETRATE;
return GJKResult::SEPARATED;
}
// Do not generate a contact point with zero normal length