Set offset and rotation from building

This commit is contained in:
2023-11-07 13:45:58 -05:00
parent fc15e9310d
commit 3e50782979
+1 -1
View File
@@ -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);