Forum Discussion

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

OVRInput.GetUp not working correctly in Unity 2017.2 with GearVR Controller

So, I seem to have encountered an issue in Unity 2017.2 with Oculus Utilities v 1.18.1. Calling OVRInput.GetUp(OVRInput.Button.PrimaryIndexTrigger) does not return true when releasing the trigger on a GearVR Controller. I wrote the following code to test this:
void Update () {
  if (OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger))
        {
            r1.material.color = Color.red;
        }
        if (OVRInput.GetUp(OVRInput.Button.PrimaryIndexTrigger))
        {
            r1.material.color = Color.white;
        }
        if (OVRInput.GetDown(OVRInput.Button.PrimaryTouchpad))
        {
            r2.material.color = Color.red;
        }
        if (OVRInput.GetUp(OVRInput.Button.PrimaryTouchpad))
        {
            r2.material.color = Color.white;
        }
        if (OVRInput.GetDown(OVRInput.Button.Back))
        {
            r3.material.color = Color.red;
        }
        if (OVRInput.GetUp(OVRInput.Button.Back))
        {
            r3.material.color = Color.white;
        }
    }
The Primary Touchpad and Back button work appropriately when the GetUp and GetDown functions are called, and GetDown works with the Trigger, but GetUp is just not working. I tried this same code in 2017.1 and it works fine.

23 Replies

Replies have been turned off for this discussion