Search Unity

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

Discussion in 'AR/VR (XR) Discussion' started by James_CC, Oct 17, 2017.

  1. James_CC

    James_CC

    Joined:
    Apr 17, 2017
    Posts:
    6
    Also posted over on the Oculus Forums here:
    https://forums.oculus.com/developer...-unity-2017-2-with-gearvr-controller/p1?new=1

    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:

    Code (CSharp):
    1. void Update () {
    2.         if (OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger))
    3.         {
    4.             r1.material.color = Color.red;
    5.         }
    6.         if (OVRInput.GetUp(OVRInput.Button.PrimaryIndexTrigger))
    7.         {
    8.             r1.material.color = Color.white;
    9.         }
    10.  
    11.         if (OVRInput.GetDown(OVRInput.Button.PrimaryTouchpad))
    12.         {
    13.             r2.material.color = Color.red;
    14.         }
    15.         if (OVRInput.GetUp(OVRInput.Button.PrimaryTouchpad))
    16.         {
    17.             r2.material.color = Color.white;
    18.         }
    19.  
    20.         if (OVRInput.GetDown(OVRInput.Button.Back))
    21.         {
    22.             r3.material.color = Color.red;
    23.         }
    24.         if (OVRInput.GetUp(OVRInput.Button.Back))
    25.         {
    26.             r3.material.color = Color.white;
    27.         }
    28.     }
    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.

    Can anyone else confirm this is an issue? And if so, anyone have suggestions on workarounds? Hopefully besides downgrading back to 2017.1
     
  2. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    There are two threads about it currently on the oculus forums and the 1.18.1 release notes do say to use 2017.1 not 2017.2. Hard to say from the outside whether the issue is Unity's or Oculus's but there does seem to be a bad implementation with the latest version.