Rotation slot location by building rotation.

This commit is contained in:
2023-05-02 08:39:03 -04:00
parent 48172fb220
commit b7c2e09b81
2 changed files with 8 additions and 11 deletions
+7 -10
View File
@@ -896,8 +896,6 @@ public class Mob extends AbstractIntelligenceAgent {
this.bindLoc = new Vector3fImmutable(this.statLat, this.statAlt, this.statLon);
this.bindLoc = this.building.getLoc().add(this.bindLoc);
this.loc = new Vector3fImmutable(bindLoc);
this.endLoc = new Vector3fImmutable(bindLoc);
} else {
@@ -918,16 +916,15 @@ public class Mob extends AbstractIntelligenceAgent {
this.bindLoc = 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);
this.endLoc = new Vector3fImmutable(bindLoc);
;
}
// Rotate slot position by the building rotation
this.bindLoc = Vector3fImmutable.rotateAroundPoint(building.getLoc(), this.bindLoc, -building.getBounds().getQuaternion().angleY);
this.loc = new Vector3fImmutable(bindLoc);
this.endLoc = new Vector3fImmutable(bindLoc);
// Configure building region and floor/level for this Mobile
this.region = BuildingManager.GetRegion(this.building, bindLoc.x, bindLoc.y, bindLoc.z);
+1 -1
View File
@@ -364,7 +364,7 @@ public class NPC extends AbstractCharacter {
// Rotate slot position by the building rotation
Vector3fImmutable.rotateAroundPoint(building.getLoc(), this.bindLoc, -building.getBounds().getQuaternion().angleY);
this.bindLoc = Vector3fImmutable.rotateAroundPoint(building.getLoc(), this.bindLoc, -building.getBounds().getQuaternion().angleY);
this.loc = new Vector3fImmutable(bindLoc);