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

Controller Input using OpenVR, not SteamVR

Discussion in 'VR' started by Innovine, Oct 2, 2018.

  1. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    I'm trying to avoid using SteamVR... I have headset and controller tracking working fine using the XR api, but am stuck on reading the buttons. The documentation suggests each controller works as a Joystick and I might be able to get the buttons and axis values via the Input system, but fails to mention how exactly this should be done. Am I supposed to map things with the Settings->Input screen? If so, what? I just see Joystick 1, Joystick 2, Joystick 3, etc... which ones are the controllers? Which ones are the other (normal) joysticks connected to my PC? How am I supposed to deal with Joysticks being added and removed, or an entirely different setup on someone elses PC?

    I am using 2018.3.0b3
     
    Last edited: Oct 2, 2018
  2. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Wow, I really must check out that registerinputs function. I went to the settings/input menu and manually created Joy1Axis1, Joy1Axis2, etc although not for all, but still maybe a hundred.
    Then I cried when importing some asset wiped the whole setup.
     
  3. Tesrym

    Tesrym

    Joined:
    Dec 2, 2012
    Posts:
    64
    Here are my settings. These work with Vive wands.
     

    Attached Files: