mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-07 13:05:41 +00:00
Sync full head rotation
This commit is contained in:
parent
64dd596fba
commit
cd9108676e
@ -39,6 +39,6 @@ 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;
|
||||
bone.localRotation = Quaternion.Euler(0f, 0f, lookLocalRotation.eulerAngles.x);
|
||||
bone.localRotation = Quaternion.Euler(lookLocalRotation.eulerAngles.y, lookLocalRotation.eulerAngles.z, lookLocalRotation.eulerAngles.x);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user