Search Unity

Using the Steam VR plugin with Oculus Rift

Discussion in 'AR/VR (XR) Discussion' started by RSH1, Sep 7, 2017.

  1. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    I've been developing for Vive thus far and now it's time to get it working for Oculus, too. I'm using the SteamVR plugin however this does not seem to work with Oculus Touch automatically, the controllers don't work, and only the camera works (which I think is Unity detecting the VR rather than the plugin)

    Is there something I need to do to get the SteamVR plugin working with Oculus Touch? Or do I have to rewrite functionality using Oculus' plugin or something?
     
    Last edited: Sep 8, 2017
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    FYI, Oculus makes the Rift, unless you mistyped. Have you done the SteamVR room setup?
     
  3. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    I'm asking if I can continue using the Steam VR plugin with the Rift as well as the Vive, or do I have to recode my player controller/controls using the Oculus Plugin or use something like VRTK in order to achieve interoperability.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, you mistyped and meant Vive and not Rift. Touch should work with the SteamVR plugin, I just a bit of Google searching to confirm.
     
  5. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    Which is strange because it doesn't work in the Editor or standalone Build & Run.

    I've discovered that if I upload the binary to a Steamworks depot, then launch the game from the Steam client itself, it works as Steam seems to emulate the controls (same as if you run a commercial Vive game under Steam it will work with Rift controls). It's a shame it doesn't seem to do this with the Unity Editor as it makes testing using the Rift difficult.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Have you done the SteamVR room setup with the controllers?
     
  7. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    Yes.
     
  8. doubledh

    doubledh

    Joined:
    Dec 4, 2017
    Posts:
    1
    I've been messing around with the Steamvr plugin just recently (unity version 2017.1.f1) and had a small nightmare of nuance getting the touch controllers to surefire work with the steamvr plugin. What I do to make sure it works correctly:
    1) Open oculus rift app (can skip the latter half of setup, where it starts doing its own setup)
    2) Open steamvr from steam (run its version of room setup)
    3) Open unity AFTER both of the other two are open (you may have restart it if it was not already open before the other two)
    4) make sure that openVR takes precedence over oculus rift in
    edit>project settings>player>other settings/rendering>virtual reality supported> supported sdk's.
    You may have to hit the minus button to remove the oculus rift and openVR and add them back with the plus button, with openVR first. I believe in the more recent version of unity, the settings are in a different XR settings-pane (I'm scared it'll blow up if I upgrade mine right now, haha).
    The Oculus sdk is necessary for the actual rendering through the headset I'm pretty sure (it wouldn't display for me otherwise, even if the controllers were actually rendering through the computer-in-game with the OpenVR alone), but I guess that the openVR sdk needs to be there first for the SteamVR plugin to use its version of the controllers instead of what Oculus has in mind.
     
  9. chunk_split

    chunk_split

    Joined:
    Dec 25, 2017
    Posts:
    7
    So, does this mean that anyone here has actually gotten a SteamVR_TrackedController to work with the Oculus Touch controllers? I'm only asking since I'm strongly considering getting the Oculus Rift + Touch for development at another desk/location and didn't want to waste my time/money if I should just instead get another Vive (I'd rather it "just work" or have a fairly low threshold to entry at the moment).
     
  10. squallfgang

    squallfgang

    Joined:
    Sep 13, 2016
    Posts:
    21
    Almost a year later, but i encountered the same problem and found a solution:

    If using the Player Prefab from steam vr it shoud work no problem.
    However if using only the Camera Rig it doesn't. To make it work make sure that you only(!!!) have the Open VR inside the Project Settings->Player->XR Settings -> VR SDKs

    So in case there is a Oculus SDK and a Open VR remove the Oculus sdk. After that it works perfectly!
     
  11. THEDUTCHM4N

    THEDUTCHM4N

    Joined:
    Dec 30, 2018
    Posts:
    1
    How dit you removed that sdk?
     
  12. c_Feng

    c_Feng

    Joined:
    May 15, 2017
    Posts:
    18
    First, you can definitely develop and test with SteamVR using the Oculus Rift hardware. I'm currently doing it.

    As others have stated before me, make sure your XR Settings lists OpenVR and not Oculus, or at least have it above Oculus so that OpenVR takes priority.

    Additionally, Oculus Home likes to take precedence over SteamVR when both is running on your PC. When this happens, entering Play mode in the Editor will not exit you out of the Oculus Home.
    If this is happening, close Unity, SteamVR, then Oculus, in that order.
    Then open Oculus, SteamVR, and then Unity (with OpenVR as the main XR SDK), again, in that order.
    SteamVR should be your default compositor and testing with the Oculus Rift for SteamVR should now be possible.

    Good luck!

    Edit: It seems that SteamVR must be started using the Steam application with the [VR] button at the top right (next to the button for "Big Picture Mode"). This enforces Steam Home to open with SteamVR, which overrides the Oculus Home.
     
    Last edited: Jan 18, 2019
  13. Avatarum

    Avatarum

    Joined:
    Jan 10, 2017
    Posts:
    4
    strange thing... in the Unity editor Oculus functions partly... build and run as an exe it works fine.
    I developed with 2017.... and run 2018.3 now.