Skip to content

Commit 21f875a

Browse files
committed
ReFix UpdateBBs dexyfex#332
dexyfex#332 kirill-mapper
1 parent d59967d commit 21f875a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ public void UpdateBBs(Archetype arch)
738738
{
739739
var earch = rooment.Archetype;
740740
var pos = rooment._CEntityDef.position;
741-
var ori = rooment._CEntityDef.rotation.ToQuaternion();
741+
var ori = Quaternion.Invert(rooment._CEntityDef.rotation.ToQuaternion());
742742
Vector3 abmin = earch.BBMin * rooment.Scale; //entity box
743743
Vector3 abmax = earch.BBMax * rooment.Scale;
744744
c[0] = abmin;
@@ -752,7 +752,7 @@ public void UpdateBBs(Archetype arch)
752752
Vector3 center = (abmin + abmax) * 0.5f;
753753
for (int n = 0; n < 8; n++)
754754
{
755-
Vector3 corn = ori.Multiply(c[n] - center) + center + pos;
755+
Vector3 corn = ori.Multiply(c[n]) + pos;
756756
min = Vector3.Min(min, corn);
757757
max = Vector3.Max(max, corn);
758758
}

0 commit comments

Comments
 (0)