I’m trying to rotate my player on y-axis according to users head rotation. The closest method I could find is this piece of code:
public class playerController : MonoBehaviour {
void Update () {
transform.eulerAngles = UnityEngine.VR.InputTracking.GetLocalRotation (UnityEngine.VR.VRNode.CenterEye).eulerAngles;
}
}
However this seems to rotate player only half of the head rotation. So if user rotates his head 90 degrees the player object rotates approximately 45 degrees. How can I do this properly?