From afd3f0edcbb64d55b9ad945ce97e55f105c1c103 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sat, 13 Aug 2022 20:06:57 +0100 Subject: [PATCH] comment --- QSB/Animation/Player/PlayerHeadRotationSync.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/QSB/Animation/Player/PlayerHeadRotationSync.cs b/QSB/Animation/Player/PlayerHeadRotationSync.cs index d71b0f35..cc41f8d5 100644 --- a/QSB/Animation/Player/PlayerHeadRotationSync.cs +++ b/QSB/Animation/Player/PlayerHeadRotationSync.cs @@ -39,6 +39,7 @@ public class PlayerHeadRotationSync : MonoBehaviour var bone = _attachedAnimator.GetBoneTransform(HumanBodyBones.Head); // Get the camera's local rotation with respect to the player body var lookLocalRotation = Quaternion.Inverse(_attachedAnimator.transform.rotation) * _lookBase.rotation; + // no idea why this rotation is like this, but this is the only way it looks right bone.localRotation = Quaternion.Euler(-lookLocalRotation.eulerAngles.y, -lookLocalRotation.eulerAngles.z, lookLocalRotation.eulerAngles.x); } } \ No newline at end of file