mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 00:32:43 +00:00
comment
This commit is contained in:
parent
1b790045d6
commit
afd3f0edcb
@ -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);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user