Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
jamescc1's avatar
jamescc1
Explorer
6 years ago

Why is OVR.Get() not returning correct values for Axis2D arguments, on Quest?

I am experimenting with some Quest development, and having trouble getting the thumbstick input values to read.  I am able to get buttons and 1 dimensional axes to read, but not 2d axes for whatever reason.  Below is a test I did:

These give the proper values:


Debug.Log("PrimaryIndexTrigger " + OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger));




Debug.Log("One " + OVRInput.Get(OVRInput.Button.One));









These give all zero's or false, and never update in response to controller input:

       
Debug.Log("Two " + OVRInput.Get(OVRInput.Button.Two));


   Debug.Log("PrimaryThumbstickDown " + OVRInput.Get(OVRInput.Button.PrimaryThumbstickDown));
        Debug.Log("PrimaryThumbstickLeft " + OVRInput.Get(OVRInput.Button.PrimaryThumbstickLeft));
        Debug.Log("PrimaryThumbstickRight " + OVRInput.Get(OVRInput.Button.PrimaryThumbstickRight));
        Debug.Log("PrimaryThumbstick " + OVRInput.Get(OVRInput.Touch.PrimaryThumbstick));
        Debug.Log("SecondaryThumbstick " + OVRInput.Get(OVRInput.Touch.SecondaryThumbstick));
        Debug.Log("SecondaryThumbstick " + OVRInput.Get(OVRInput.Axis2D.SecondaryThumbstick));
        Debug.Log("PrimaryThumbstick " + OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick));
        Debug.Log("LThumbstick " + OVRInput.Get(OVRInput.RawAxis2D.LThumbstick));
        Debug.Log("LTouchpad " + OVRInput.Get(OVRInput.RawAxis2D.LTouchpad));
        Debug.Log("PrimaryTouchpad " + OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad));
        Debug.Log("SecondaryTouchpad " + OVRInput.Get(OVRInput.Axis2D.SecondaryTouchpad));

Funny enough, the a button (the "One" enum) works while the b button ("Two") doesn't.

Running Unity 2019.1.2f1 with the latest Oculus android package and Oculus integration.

I tried completely removing the OpenVR package as well to no avail.

It's all very strange to me, hoping I can find some insight on here.

2 Replies

Replies have been turned off for this discussion
  • Having the same issue with all zeros. Did you ever find a solution?
  • I did solve it, but quite some time has passed since I've worked on this so it's hard to remember exactly.

    If memory serves, there was in fact an available update to my oculus integration, which of course broke some other things which needed to be fixed individually.  I would suggest making a branch with the latest oculus integration package (if you don't already have it), running a simple test, and if you get meaningful values then go through the trouble of upgrading your whole project to it.