Rotation slot location by building rotation.

This commit is contained in:
MagicBot committed 2023-05-02 08:26:43 -04:00
1 parent 0aabc9a923
commit 48172fb220
2 files changed
+14 -3

No files matched your search

+6 -1
View File
@@ -361,7 +361,12 @@ public class NPC extends AbstractCharacter {
slotLocation = BuildingManager.getSlotLocation(building, slot);
this.bindLoc = building.getLoc().add(slotLocation);
this.loc = building.getLoc().add(slotLocation);
// Rotate slot position by the building rotation
Vector3fImmutable.rotateAroundPoint(building.getLoc(), this.bindLoc, -building.getBounds().getQuaternion().angleY);
this.loc = new Vector3fImmutable(bindLoc);
// Configure region and floor/level for this NPC