load mesh data and structure meshes

This commit is contained in:
2024-01-15 19:32:49 -06:00
parent 6215e15e82
commit 5b9d1dd6eb
4 changed files with 18 additions and 2 deletions
@@ -1046,6 +1046,13 @@ public enum BuildingManager {
}
building.buildingMeshes.add(generatedMesh);
}
Rectangle2D.Float buildingBound = new Rectangle2D.Float();
float xLoc = building.loc.x - building.getBounds().getHalfExtents().x;
float zLoc = building.loc.z - building.getBounds().getHalfExtents().y;
float width = building.getBounds().getHalfExtents().x * 2;
float height = building.getBounds().getHalfExtents().y * 2;
buildingBound.setRect(xLoc,zLoc,width,height);
building.buildingRect = buildingBound;
}
catch(Exception e){
Logger.info("Failed To Bake Building Mesh Data For Structure: " + building.meshUUID);