Search Unity

Trigger Input Manager 'Fire1' with Oculus Touch controller button

Discussion in 'AR/VR (XR) Discussion' started by moosefetcher, Apr 20, 2018.

  1. moosefetcher

    moosefetcher

    Joined:
    Sep 23, 2015
    Posts:
    74
    I'm fairly new to VR and I'd like to know what the best practise is for detecting button inputs from the Oculus Touch controllers. I'm detecting the controllers' rotation using:
    InputTracking.GetLocalRotation(XRNode.LeftHand);
    ...and that's working well, but I'm at a loss at how to detect a button press from the Oculus Touch controllers.
    I've read a few things online about an Oculus 'plugin' OVRInput, but do I really need to download a plugin to detect button input in Unity? I'd prefer to take advantage of the in-built Unity Input Manager, if possible.

    I'm doing a check for Input.GetButtonDown("Fire1") but I think that value in the Input Manager is assigned to the left mouse. How would I assign that to a Touch button?

    What do people here generally do? What's the best/normal practise?
    Thanks for any pointers (or especially examples!).

    EDIT: OK, I've realised my 'Fire1' code was working, just not with the button I was intending. But I'd still like to know how I can assign Touch controller buttons to actions in my game... Thanks!
     
    Last edited: Apr 20, 2018