Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil25 committed Jan 16, 2024
1 parent 10096f1 commit f7707c0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Player/VRPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ private void Update()
if ((xrOrigin.position - lastOriginPos).sqrMagnitude > sqrMoveThreshold) // player moved
// Rotate body sharply but still smoothly
TurnBodyToCamera(turnWeightSharp);

else if (!playerController.inSpecialInteractAnimation && GetBodyToCameraAngle() is var angle && angle > turnAngleThreshold)
// Rotate body as smoothly as possible but prevent 360 deg head twists on quick rotations
TurnBodyToCamera(turnWeightSharp * Mathf.InverseLerp(turnAngleThreshold, 170f, angle));
Expand Down

0 comments on commit f7707c0

Please sign in to comment.