04-02-2021 06:16 PM
Hello, I am developing an application for Oculus Quest2 that will eventually run as an experiment. For part of this experiment, I wish to mirror the rotation of the camera such that its y axis(yaw) is inverted. This will make it so that when the user rotates right, they will effectively see the opposite motion sequence - i.e: what they would have seen if they had rotated to the left. I want to be able to control when this mirroring happens, as it should only last for brief segments of the game.
I have tried tinkering with the OVRCameraRig.cs file in the Unity Integration Package (in "if(updateEyeAnchors)" section) with no luck. Specifically, I have tried setting the localRotation of the centerEyeAnchor to its inverse y value. Because I don't know how to mirror Yaw with quaternions, however, I do this in a roundabout way - by converting centerEyeAnchor to Euler angles and doing the manipulation with Vector3s.
Is hacking the OVRCameraRig script possible in this way or is some of this HMD to camera mapping inaccessible? I am open to any suggestions!
Thanks in advance!