Browse Source

Stuck location rotated properly.

master
MagicBot 1 year ago
parent
commit
5899bb535b
  1. 4
      src/engine/objects/Building.java

4
src/engine/objects/Building.java

@ -1245,6 +1245,10 @@ public class Building extends AbstractWorldObject { @@ -1245,6 +1245,10 @@ public class Building extends AbstractWorldObject {
stuckLocation = stuckLocations.get(ThreadLocalRandom.current().nextInt(stuckLocations.size())).getLocation();
stuckLocation = this.getLoc().add(stuckLocation);
// Rotate stuck position by the building rotation
stuckLocation = Vector3fImmutable.rotateAroundPoint(this.getLoc(), stuckLocation, this.getBounds().getQuaternion().angleY);
return stuckLocation;
}

Loading…
Cancel
Save