Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Both Oculus and normal game 2-in-1

Discussion in 'AR/VR (XR) Discussion' started by jonatanbijl, Jan 20, 2015.

  1. jonatanbijl

    jonatanbijl

    Joined:
    Oct 7, 2013
    Posts:
    12
    Most of the how-to's about the oculus rift say "remove your firstperson camera, add the OVRCameraRig" or something similar. But for my game, I want to build an Oculus rift version and a normal (PC screen) version of the game. How would i approach that without having to disable and enable cameras every time? Is there a way to the "normal" game usable in normal mode and the "DirectToRift" game using the rift?
     
  2. Pascal-Serrarens

    Pascal-Serrarens

    Joined:
    Jan 14, 2013
    Posts:
    40
    That is why I developed my (free and paid) VR assets such that when no Rift is detected, it will switch to normal screen and input. This allows people without Rift still to experience the game in an alternative way.
    You may want to look into InstantVR Free.

    BTW: I noticed somewhere that the _direct_to_rift is going to disappear soon and that you can always use the normal .exe in every case soon.
     
  3. Akshayk1

    Akshayk1

    Joined:
    Jul 22, 2015
    Posts:
    1
    Hi Guys,

    Do you know of anyway to change from the computer screen to Oculus Rift or the VR head gear during the game? Im making a mini game and during mini games I would like players to switch to their VR head gear.

    Thanks
     
  4. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    When you're using the SteamVR Unity Plugin from the Unity Asset Store, you're pretty flexible with cameras. So you can easily even have one camera that renders something completely different to the 2D monitor while the player that's wearing the headset could see something completely unrelated, or another perspective of the same thing - whatever makes sense for your game.

    I really hope that Unity's native VR integration will eventually learn from Valve to make things like this possible in the usual "Unity way" of using components to add functionalities (I'm really not happy with the way they did it for the native VR integration).

    Here's a video with three cameras on the monitor - I recorded this while playing the game in VR (with the DK2). The small bottom left screen is pretty much what I was seeing (but I have the other two screens also on planes in the 3D world, so the bottom right one is actually something I could look at kind of like a mirror ;-) ):


    Meanwhile, I've even added a little GUI to control a few things from the monitor ... and one thing I'll soon add is a combined 2D/3D GUI:

    When you take off the headset, you'll have a "common" GUI where you can enter text with the keyboard and select stuff with the mouse. When you have the headset on, you'll be able to work with the "same GUI" but it's actually implemented using different objects and a completely different layout designed specifically for VR, plus a "VR keyboard".

    That way, you have several possibilities as a player: Take off the headset for a moment and do things quickly on the keyboard, or: take a little more time and enter your stuff in VR, staying full immersed, or: ask someone standing nearby to quickly type in the stuff you need on the monitor/mouse/keyboard (and you'll see if they type stupid stuff because the two GUIs are synchronized).

    There's one interesting thing about password fields in this scenario: When I stop rendering the VR cam to the 2D monitor (which I can easily switch off, of course), I can safely show the password in the textbox that is visible in the headset. Only the player himself can see that - so that's fairly safe. On the 2D screen, the usual password masking has to be used, of course (because you might not even know that someone sneaked into your room to grab your password from the screen ;-) ).