Skip to content
Snippets Groups Projects
Commit 12e5357c authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

[Bug] Fix computation of penetration depth for triangle / triangle query.

parent c83a604f
No related branches found
No related tags found
No related merge requests found
......@@ -672,6 +672,9 @@ bool GJKSolver_indep::shapeDistance<Capsule, Capsule>
(P1, P2, P3, Q1, Q2, Q3, tf1, tf2, normal);
dist = -penetrationDepth;
assert (dist <= 1e-6);
// GJK says Inside when below GJK.tolerance. So non intersecting
// triangle may trigger "Inside" and have no penetration.
return penetrationDepth < 0;
}
dist = 0;
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment