Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

OVRInput Button not working on Oculus Go

Discussion in 'AR/VR (XR) Discussion' started by NotJelly, Dec 6, 2018.

  1. NotJelly


    Sep 21, 2018
    I am trying to register the input click from the Oculus Go touch pad controller. The code is halfway working, but somehow the click never registers.

    I have an OVR Manager in the scene, so OVRInput.Update() is definitely called.
    Then in my script, I have the following functions:

    Code (CSharp):
    1.     // Update is called once per frame
    2.     void Update ()
    3.     {
    4.         // THIS WORKS and prints non-zero output when I touch the touch pad
    5.         touchPosition = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad);
    6.         Debug.Log("Touch position: " + touchPosition.ToString());
    8.         // THIS DOES NOT WORK and always prints 'No button down'
    9.        // no matter what button I press
    10.         if (OVRInput.GetDown(OVRInput.Button.PrimaryTouchpad))
    11.             Debug.Log("Some button down");
    12.         else
    13.             Debug.Log("No button down");
    15.     }
    What am I missing here? Why do my buttons not work?
    Last edited: Dec 6, 2018
    andywatts likes this.
  2. JoeStrout


    Jan 14, 2011
    I don't know; that should work if you actually click the thumb disc. It works for me. (Though I'm using Get rather than GetDown — but I would expect it to work either way.)

    Do other inputs (like OVRInput.Touch.PrimaryTouchpad or OVRInput.Button.PrimaryIndexTrigger) work for you?