diff --git a/src/engine/math/Bounds.java b/src/engine/math/Bounds.java index 04998e1c..cfa3afe6 100644 --- a/src/engine/math/Bounds.java +++ b/src/engine/math/Bounds.java @@ -422,7 +422,7 @@ public class Bounds { this.origin.set(building.getLoc().x, building.getLoc().z); - // Magicbane uses half halfExtents + // Magicbane uses halfExtents if (meshBounds == null) { halfExtentX = 1; @@ -438,8 +438,10 @@ public class Bounds { // The rotation is reset after the new aabb is calculated. this.rotation = building.getRot().y; + // Caclculate and set the new half halfExtents for the rotated bounding box // and reset the rotation to 0 for this bounds. + this.halfExtents.set(halfExtentX, (halfExtentY)); this.rotation = 0; @@ -453,7 +455,6 @@ public class Bounds { this.halfExtents.set(blueprint.getExtents()); this.flipExtents = Bounds.calculateFlipExtents(this); - this.setRegions(building); this.setColliders(building); diff --git a/src/engine/objects/Building.java b/src/engine/objects/Building.java index ccc24963..408121e5 100644 --- a/src/engine/objects/Building.java +++ b/src/engine/objects/Building.java @@ -779,10 +779,6 @@ public class Building extends AbstractWorldObject { return this.meshUUID; } - public final void setMeshUUID(int value) { - this.meshUUID = value; - } - public final Resists getResists() { return this.resists; }