VR and non VR Camera simultaniously?
Hey there,
I'm trying to make a game where one player is in the oculus and the other plays on a display. however when I use enable VR in the player settings to activate the oculus, both cameras respond to the movement of the oculus. Does anybody know how to restrict the VR enabled to just one camera?
Thanks for the help
Answer by PowerBank · Sep 19, 2016 at 01:49 PM
I just had a similar problem, but found a solution :)
I solved it by setting the “Target Eye” parameter on the cameras (not for HMD) to “None (Main Display)”. I'm guessing that you already set the 'Target Display" to "display 2" or something that's not the same as the what the HMD is set to.
As far as I know, you have to make a build of the game to test it out - I don’t think you can have multiple displays when running the game from the Unity Editor.
In the bottom of the documentation there are instructions on how to open the game with multiple displays (hint: use the -multidisplay command when opening the game from command prompt).
Hope this helps!
Perfect!!!!!! That's exactly what I was looking for! Thank you sooo much you just saved me :)
@simpok did you get it working in runtime or just editor?
I got it working in editor. So to switch between the displays I have to choose them in the Game Tab. But one camera is normal and one is Vr and reacts to oculus just as expected!
Answer by scobot · Jul 01, 2017 at 09:10 PM
I got this to work (for the Vive) - and maybe this is not the proper way to do it (or even advisable, what do I know?!) but this is how I set up the two cameras to display different "feeds" to the HMD and desktop monitor:
1) Camera that is you VR camera (eyes): Target Display = Display 1 > Target Eye = BOTH
2) Second camera (for desktop monitor): Target Display = Display 1 > Target Eye = None (Main Display)
It ran a little choppy in the editor when I tested it, but when I built it and ran it, it worked great. The desktop monitor showed one angle (even full screen) and the HMD showed the complete VR view.
Like I said, not sure if this is proper, or if it will cause other issues, but seems to be working just fine. Hope it helps.
This worked exactly right for me, however I also set the depth of my desktop camera to 1 which is higher than that of the VR camera. Thanks!
Answer by DanielleSisserman · Sep 20, 2018 at 11:06 AM
I had the same challenge and for some reason none of these advice worked for me. finally I found out I could change the depth and not the target display:
https://answers.unity.com/questions/1238597/how-to-have-two-cameras-in-game-with-steamvr-camer.html
Answer by grobm · Sep 20, 2016 at 02:44 AM
@PowerBank I still find that you need three monitors... otherwise the HMD display goes black when you set it to Display1 and Display 2 to Main Display? Can you share a sample project on how you got it to work right? Currently I find in the editor it works as expected minus some funny redraw issues with canvas layers. But when I build to runtime the Oculus CV1 for example does not render... it goes black and it appears to only draw on the main monitor what should be in the HMD.
If you have a mac with custom graphic cards in external bays... remember it will work on macs too... just need to disable "Displays have separate Spaces" on $$anonymous$$acOS 10.10+ or later.