Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

OVRInput Button not working on Oculus Go

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

  1. NotJelly

    NotJelly

    Joined:
    Sep 21, 2018
    Posts:
    1
    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());
    7.  
    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");
    14.  
    15.     }
    What am I missing here? Why do my buttons not work?
     
    Last edited: Dec 6, 2018
    andywatts likes this.
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    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?