Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    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:
    314
    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:
    314
    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:
    59
    Here are my settings. These work with Vive wands.
     

    Attached Files:

unityunity