Fix issue in GJK algorithm when numerical issue occurs
This commit is contained in:
parent
dd91f6dcbf
commit
1b82a3e228
|
@ -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 the penetration depth is negative (due too numerical errors), there is no contact
|
||||||
if (penetrationDepth <= decimal(0.0)) {
|
if (penetrationDepth <= decimal(0.0)) {
|
||||||
return GJKResult::INTERPENETRATE;
|
return GJKResult::SEPARATED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not generate a contact point with zero normal length
|
// Do not generate a contact point with zero normal length
|
||||||
|
|
Loading…
Reference in New Issue
Block a user