1
\$\begingroup\$

I was tasked with creating a demo for something involving VR. They want people to use the VR headset, but they also want to visualize some of the calculations that go on behind the scene to the audience.

To that end, I was asked to have the computer screen show something different to what the VR is showing.

The difference would be the addition of objects from a layer that isn't included in the OVRCameraRig's left and right cameras' culling mask.

I've tried messing a bit with the code in the OVRCameraRig script to make sure all 3 cameras (left, right, and center) are enabled, but that didn't work (and I'm hoping there's a simpler solution than debugging that script to try and make that work)

I've also tried adding a camera as a child of LeftEyeAnchor with its culling mask set only to the additional layer I want to overlay, its target set to Left eye, and Clear Flags set to Depth only, but that led to the right eye getting nothing and the left eye getting the object I don't want to be seen on the VR goggles.

Is there a way for me to either get the overlay to only show up on the screen or create another window that will show everything without a 3rd camera that repeats everything already done with the other cameras? (That is, I worry that adding a 3rd camera with its culling mask set to "everything" and having that displayed on another screen would drop the FPS)

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

You probably had the "almost" there solution with the child of LeftEyeAnchor.

Did you check this out first: https://docs.unity3d.com/Manual/MultiDisplay.html

You will want to add an additional camera for displaying it's view on a separate display altogether.

The parenting to the VR objects in the scene might be causing you headache if the scripts are expecting camera's in that game hierarchy to be used for the VR headset and are modifying properties or something. If that is the case you can always just add a Follow MonoBehavior to your camera to move with the other camera's but not be a child of them.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .