Fix ghost collisions in segment_intersects_convex()

This commit is contained in:
Kaleb Reid 2025-05-04 22:20:48 -07:00
parent 1cf573f44d
commit a2b9fc08e3
2 changed files with 5 additions and 0 deletions

View file

@ -292,6 +292,10 @@ public:
real_t den = p.normal.dot(dir);
if (Math::abs(den) <= (real_t)CMP_EPSILON) {
if (p.is_point_over(p_from)) {
// Separating plane.
return false;
}
continue; // Ignore parallel plane.
}