- Home /
Is it possible to override the "Cannot set field of view on camera with name 'screenCamera' while VR is enabled." limitation?
So, when I try and adjust the FoV for a camera in my project at runtime I get this error: "Cannot set field of view on camera with name 'screenCamera' while VR is enabled."
I understand this limitation is put in place to avoid rendering at an FoV which does not match the FoV of a headset, but there is a major oversight where this limitation applies to ALL cameras, even those which are NOT being used for the VR view. I have a virtual camera in my scene which renders to a virtual screen in-game, so it would cause no problems to change this FoV- yet Unity still doesn't allow it. Is there any way to force an override for this?
Is it Unity, or a VR plugin you use? Not sure about this specific case, but I'm using VRT$$anonymous$$ and it does all sorts of strange stuff with all the cameras on scene. If it's a plugin you probably have access to source code, so you should be able to change this behavior.
Answer by dustxx · Nov 28, 2019 at 09:01 AM
Thanks to ethan.fight4dream on the VRTK Slack, I have a solution to this. Change the "Target Eye" property of the Camera to "None (Main Display)" and you will be allowed to change the FoV. You can also do this via code with this: camera.stereoTargetEye = StereoTargetEyeMask.None;
Your answer
Follow this Question
Related Questions
how to make Oculus Touch door opening 0 Answers
OVR Grabbable causes object to ignore OnCollisionEnter/Exit 2 Answers
How can I let a VR player walk up walls using Oculus' OVR Camera rig? 0 Answers
How to disable automatic recentering when using OVRCameraRig 0 Answers
How do you detect the Oculus remote without using OVRInput? 0 Answers