File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Assets/VRTK/Source/Scripts/Locomotion Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ protected virtual void Rotate()
386386 if ( rotationTrackingController == TrackingController . BothControllers && VRTK_ControllerReference . IsValid ( leftControllerReference ) && VRTK_ControllerReference . IsValid ( rightControllerReference ) )
387387 {
388388 Vector2 currentRotationAngle = GetControllerRotation ( ) ;
389- float newAngle = Vector2 . Angle ( currentRotationAngle , previousRotationAngle ) * Mathf . Sign ( currentRotationAngle . x * currentRotationAngle . y - previousRotationAngle . x * previousRotationAngle . y ) ;
389+ float newAngle = Vector2 . Angle ( currentRotationAngle , previousRotationAngle ) * Mathf . Sign ( Vector3 . Cross ( currentRotationAngle , previousRotationAngle ) . z ) ;
390390 RotateByAngle ( newAngle ) ;
391391 previousRotationAngle = currentRotationAngle ;
392392 }
@@ -430,4 +430,4 @@ protected virtual void Scale()
430430 previousControllerDistance = currentDistance ;
431431 }
432432 }
433- }
433+ }
You can’t perform that action at this time.
0 commit comments