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()
386
386
if ( rotationTrackingController == TrackingController . BothControllers && VRTK_ControllerReference . IsValid ( leftControllerReference ) && VRTK_ControllerReference . IsValid ( rightControllerReference ) )
387
387
{
388
388
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 ) ;
390
390
RotateByAngle ( newAngle ) ;
391
391
previousRotationAngle = currentRotationAngle ;
392
392
}
@@ -430,4 +430,4 @@ protected virtual void Scale()
430
430
previousControllerDistance = currentDistance ;
431
431
}
432
432
}
433
- }
433
+ }
You can’t perform that action at this time.
0 commit comments