From 3e507829792f0a298aeeda8f27af9a280c1ad8e1 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 7 Nov 2023 13:45:58 -0500 Subject: [PATCH] Set offset and rotation from building --- src/engine/gameManager/BuildingManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 40bc83a7..6a80bbc1 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -989,7 +989,7 @@ public enum BuildingManager { // Add building offset and rotation to vertices for (Vector2f vertex : meshEntry) { - vertex.addLocal(building.getLoc().x, building.getLoc().y); + vertex.addLocal(building.getLoc().x, building.getLoc().z); Vector3fImmutable rotatedPoint = new Vector3fImmutable(vertex.x, 0, vertex.y); rotatedPoint = Vector3fImmutable.rotateAroundPoint(building.getLoc(), rotatedPoint, building.getBounds().getQuaternion().angleY); vertex.set(rotatedPoint.x, rotatedPoint.z);