File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
CodeWalker.Core/GameFiles/MetaTypes Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments