From eafe00555f013a95ea78d4a74895e91d7cf8c9fd Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 19 Jan 2024 20:32:51 -0600 Subject: [PATCH] load mesh data and structure meshes --- src/engine/collisionEngine/Mesh.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;