Browse Source

load mesh data and structure meshes

server-collision
FatBoy-DOTC 12 months ago
parent
commit
a52f0941b7
  1. 2
      src/engine/CollisionEngine/CollisionManager.java

2
src/engine/CollisionEngine/CollisionManager.java

@ -10,7 +10,7 @@ import java.awt.geom.Rectangle2D;
public class CollisionManager { public class CollisionManager {
public static boolean CollisionDetected(Building building, Line2D travelLine, float charHeight, float charY){ public static boolean CollisionDetected(Building building, Line2D travelLine, float charHeight, float charY){
if(!travelLine.intersects(building.buildingRect) && !building.buildingRect.contains(travelLine.getP1()) && !building.buildingRect.contains(travelLine.getP2())) if(building.buildingRect != null && !travelLine.intersects(building.buildingRect) && !building.buildingRect.contains(travelLine.getP1()) && !building.buildingRect.contains(travelLine.getP2()))
return false; return false;
for (Mesh mesh : building.buildingMeshes) for (Mesh mesh : building.buildingMeshes)

Loading…
Cancel
Save