Commit f3e6b5e1 authored by Human Gamer's avatar Human Gamer

Fixed Collision Issue due to incorrect Formula to calculate boundingBox

parent e528cdbd
Pipeline #1783752 skipped
......@@ -1040,6 +1040,11 @@ public class Interior
PlaneF plane = this.planes[planeIndex];
if (i == 272)
{
System.out.println("MinX: " + hull.getMinX() + ", MaxY: " + hull.getMaxY() + ", PX: " + plane.getX() + ", PY: " + plane.getY() + ", PD: " + plane.getD());
}
if (plane.getX() > 0 && plane.getD() * -1 > hull.getMaxX())
{
hull.setMaxX(plane.getD() * -1);
......@@ -1050,7 +1055,7 @@ public class Interior
if (plane.getY() > 0 && plane.getY() * -1 > hull.getMaxY())
{
hull.setMaxY(plane.getD() * -1);
hull.setMaxY(plane.getD());
} else if (plane.getY() < 0 && plane.getD() < hull.getMinY())
{
hull.setMinY(plane.getD());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment