diff --git a/src/engine/collisionEngine/Mesh.java b/src/engine/collisionEngine/Mesh.java index 1b14d1ed..db92acd6 100644 --- a/src/engine/collisionEngine/Mesh.java +++ b/src/engine/collisionEngine/Mesh.java @@ -44,9 +44,9 @@ public class Mesh { Vector3f adjustedBuildingLoc = new Vector3f(building.loc.x,building.loc.y, building.loc.z * -1); int rotDegrees = (int)Math.toDegrees(building.getBounds().getQuaternion().angleY); - this.mesh_loc = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(meshData.mesh_loc),adjustedBuildingLoc,rotDegrees); - this.mesh_ref = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(meshData.mesh_ref),adjustedBuildingLoc,rotDegrees); - this.mesh_end = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(meshData.mesh_end),adjustedBuildingLoc,rotDegrees); + this.mesh_loc = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(this.meshData.mesh_loc),adjustedBuildingLoc,rotDegrees); + this.mesh_ref = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(this.meshData.mesh_ref),adjustedBuildingLoc,rotDegrees); + this.mesh_end = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(this.meshData.mesh_end),adjustedBuildingLoc,rotDegrees); this.mesh_minY = adjustedBuildingLoc.y + this.meshData.mesh_minY; this.mesh_maxY = adjustedBuildingLoc.y + this.meshData.mesh_maxY;