File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,16 @@ private static void Postfix(UI_TargettingController __instance)
2525 var spacePosition = space . GlobalPosition ;
2626 var rootDistance = MathX . Max ( 1 , MathX . MaxComponent ( MathX . Abs ( spacePosition ) ) ) ;
2727
28- var rotationAxis = space . Right ;
28+ var rotationAxis = float3 . Right ;
2929 var angle = MathX . Clamp ( 0.1f , 5 , 0.01f * MathX . Sqrt ( rootDistance ) ) ;
3030
3131 // Add angle to camera to prevent flickering
3232 var rotation = floatQ . AxisAngle ( rotationAxis , angle ) ;
3333 __instance . ViewRotation *= rotation ;
3434
3535 // Adjust position based on angle to frame UI properly still
36- var antiRotation = floatQ . AxisAngle ( rotationAxis , - angle - 2f ) ;
37- __instance . ViewPosition = __instance . _currentCenter + ( space . GlobalRotationToLocal ( antiRotation ) * __instance . _currentPlane * __instance . _currentDistance ) ;
36+ var antiRotation = floatQ . AxisAngle ( rotationAxis , angle + 2 ) ;
37+ __instance . ViewPosition = __instance . _currentCenter + ( antiRotation * __instance . _currentPlane * __instance . _currentDistance ) ;
3838 }
3939 }
4040}
You can’t perform that action at this time.
0 commit comments