Are there any developers using Unity OVRInput class to access the Oculus secondary controller?

4.1k Views Asked by At

I am trying to use the right(secondary) controller in two unity projects. OVRInput auto-populates the button and axis-n object names in MSVS2017 from the OVR classes but the return values from the right(secondary) controller always show false. The Unity XRInputManager demo shows the results from both controller inputs and headset data. But this does not use OVRInput. Would like to use OVRInput but might not be able to. The Quest is fairly new so all the Internet doco shows nothing but Go specifications. Go has one controller. I can read all buttons from the left hand(primary) controller. MY apk responds correctly on my GO with the only controller.

OVRInput.GetButton(OVRInput.RawButton.A,Rtouch) ;// reports false in the event of 'A' button press.

As stated I am using OVRInput and it does not report the secondary controller inputs although Unity input mapping Input manager demo does. Input manager does not use OVR utilities.

if (OVRInput.Get(OVRInput.Axis1D.SecondaryHandTrigger, OVRInput.Controller.RTouch) == 1) // reports false in the event of grip button press.

Neither device or software reports hardware change. Should be true or false. As a side note: None of the inputs show any value change from the right(secondary) Oculus Quest controller. I have reported this to Oculus too.

1

There are 1 best solutions below

0
On

As far as I know the Oculus-Quest uses Oculus-Touch controllers.

The button mapping for all controllers can be found here.

It should be e.g.

OVRInput.Get(OVRInput.RawButton.A, Controller.RTouch)

or also see the example:

// public variable that can be set to LTouch or RTouch in the Unity Inspector
public Controller controller;

// returns a float of the Hand Trigger’s current state on the Oculus Touch controller
// specified by the controller variable.
OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, controller);

// returns true if the primary button (“A” or “X”) is pressed on the Oculus Touch controller
// specified by the controller variable.
OVRInput.Get(OVRInput.Button.One, controller);