Forum Discussion

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

Issue with OVRInput.Get()

Hello ! 

Yesterday, I was using the function OVRInput.Get() (On unity), to get a value between 0 and 1 when the index button of the RTouch is Trigger, like that : 
float res = OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, OVRInput.Controller.RTouch);
// or float res = OVRInput.Get(OVRInput.Axis1D.SecondaryIndexTrigger, OVRInput.Controller.Touch);

Both worked well. 
BUT Today ... I always get 0 when the index button is trigger. Same thing with the hand button, and I already try with the left controller too.

To debug this, I try this code : 

        float res = OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, OVRInput.Controller.RTouch);
        Debug.Log(" res :  " + res);
        if (OVRInput.Get(OVRInput.Button.SecondaryIndexTrigger))
            Debug.Log("Button Down SPECIFIC");

        if (OVRInput.Get(OVRInput.Button.Any))
            Debug.Log("Button Down ANY");

When I press the index trigger from the right controller, I have "Button Down ANY" in output but not "Button Down SPECIFIC" (and of course always getting "res : 0", yesterday I got a float between 0 and 1).
Then I saw that there is a release note this week (https://support.oculus.com/release-notes/) and there is some work on controller.

So I need to know if someone get the same behaviour ?

Thanks a lot !

4 Replies

  • I've noticed the same thing. My headset updated last night and now my OVRInput.GetUp function isn't working when I specify OVRInput.Controller.RTouch or OVRInput.Controller.LTouch in the second parameter.

    Thankfully my app doesn't require multiple controllers so for now I've changed:
    OVRInput.GetUp(OVRInput.Button.One, OVRInput.Controller.RTouch))
    to:
    OVRInput.GetUp(OVRInput.Button.One)

    But, I'm not sure how you're supposed to target specific controllers now. Also not sure if this is a bug or expected...
  • Hello, thanks but I've already tried it and I got the same result...
  • Mystery solved for me !

    To see which controller was available I used : Debug.Log(OVRInput.GetConnectedControllers());
    The output was : RTrackedRemote

    So I replace RTouch by RTrackedRemote :
    if (OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger, OVRInput.Controller.RTrackedRemote))
        /* Some stuff */

    And now it works for me.
    Hopefully it will help people with the same problem.