diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 09b77ec4..40bc83a7 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -986,10 +986,14 @@ public enum BuildingManager { Path2D.Float stencilPath = new Path2D.Float(); - // Add building offset to vertices + // Add building offset and rotation to vertices - for (Vector2f vertex : meshEntry) + for (Vector2f vertex : meshEntry) { vertex.addLocal(building.getLoc().x, building.getLoc().y); + 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); + } // Move to start of path