Fixed collision-detection-bug
This commit is contained in:
parent
6c1e780701
commit
45397db458
@ -148,6 +148,8 @@ public class CollisionDetector {
|
||||
boolean triangleVertex3InQuad = isPointInQuad(triangle.getBottomLeftVertex(), quad);
|
||||
if (triangleVertex3InQuad)
|
||||
return true;
|
||||
if (triangle.getTopEdge() >= quad.getTopEdge() && triangle.getBottomEdge() <= quad.getBottomEdge() && ((triangle.getLeftEdge() <= quad.getRightEdge() && triangle.getLeftEdge() >= quad.getLeftEdge()) || (triangle.getRightEdge() <= quad.getRightEdge() && triangle.getRightEdge() >= quad.getLeftEdge())))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user