Force rotate XRRig camera?

Is it possible to somehow change XRRig camera’s localRotation?

I need to rotate XRRig when player rotates camera with head. Just typing

transform.localRotation = Quaternion.identity;

not works.

I think it is due to physical movement of head camera. I want to smoothly turn player by y axis as camera rotates

Thanks.

You need to put the XRRig in a container object, which you can rotate around Y. You cannot and should not try to modify the rotation of the XRRig, since it is meant to show where you are moving/pointing your head. You can also reset the view from the headsets menu, but that’s another thing.

On later Unity versions you don’t need an XRRig just a camera with a TrackedPoseDriver, and put that in a container.