Skip to main content
Up and Coming
September 3, 2016

OVRInput.Touch isn't working

Hi,

Is there something wrong with this code for using the touch sensitive buttons?

      if (OVRInput.Get(OVRInput.Touch.SecondaryIndexTrigger))
        {

            Debug.Log("Right Hand, Trigger touch");
        }

Tried PrimaryTrigger, Thumbstick, etc. but if never seems to produce any results.
    This topic has been closed for replies.

    2 replies

    Meta Employee
    September 3, 2016
    Hmm, that code snippet is correct and works for me.

    Can you share your version of Unity, Oculus Utilities, OVRPlugin, and SDK? (Those get logged out when entering play mode w/ the Utils)

    Is it only the Touch sensitive inputs that are not working? What about OVRInput.Button.SecondaryIndexTrigger or OVRInput.Button.One? Can you log OVRInput.GetActiveController() and OVRInput.GetConnectedControllers() to verify they match expectations. And you do have an instance of OVRManager.cs in the scene? That's needed for the input state to update correctly.
    appminisAuthor
    Up and Coming
    September 3, 2016
    Aha!  OVRManager was in the scene, but for some reason not active.  Works great now, thanks!