From 1b82a3e22891ce863e94c70b8ecc842a7ed75b8c Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Thu, 7 Sep 2017 22:23:00 +0200 Subject: [PATCH] Fix issue in GJK algorithm when numerical issue occurs --- src/collision/narrowphase/GJK/GJKAlgorithm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collision/narrowphase/GJK/GJKAlgorithm.cpp b/src/collision/narrowphase/GJK/GJKAlgorithm.cpp index 9bc1d00d..7979f1df 100644 --- a/src/collision/narrowphase/GJK/GJKAlgorithm.cpp +++ b/src/collision/narrowphase/GJK/GJKAlgorithm.cpp @@ -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