File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
CodeWalker.Core/GameFiles/MetaTypes Expand file tree Collapse file tree 1 file changed +2
-3
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 ;
@@ -749,10 +749,9 @@ public void UpdateBBs(Archetype arch)
749749 c [ 5 ] = new Vector3 ( abmax . X , abmin . Y , abmax . Z ) ;
750750 c [ 6 ] = new Vector3 ( abmax . X , abmax . Y , abmin . Z ) ;
751751 c [ 7 ] = abmax ;
752- Vector3 center = ( abmin + abmax ) * 0.5f ;
753752 for ( int n = 0 ; n < 8 ; n ++ )
754753 {
755- Vector3 corn = ori . Multiply ( c [ n ] - center ) + center + pos ;
754+ Vector3 corn = ori . Multiply ( c [ n ] ) + pos ;
756755 min = Vector3 . Min ( min , corn ) ;
757756 max = Vector3 . Max ( max , corn ) ;
758757 }
You can’t perform that action at this time.
0 commit comments