Also posted over on the Oculus Forums here:
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.
Can anyone else confirm this is an issue? And if so, anyone have suggestions on workarounds? Hopefully besides downgrading back to 2017.1