Search code examples
unity-game-engineinputoculusquest

unity - oculus quest - how to read thumbstick input


I'm working on projects for oculus quest using Unity 2019.3. I have done some work in this before, but I am up against a bit for which I am having trouble finding results.

Simply, I want to reference the oculus thumbsticks in script. I have worked with the buttons before and they are just referenced as easily as with the normal unity inputs ("fire", "jump", etc. Can be set to existing input buttons like on a controller). I cannot find the same info for the oculus touch thumbsticks. I have seen ovrinput elements for this, but not in the unity input manager. What would I use to reference those inputs for coding behavior?

Thank you for your time and consideration.


Solution

  • if (OVRInput.GetUp(OVRInput.Button.PrimaryIndexTrigger))
    {
        // Do something
    }
    

    A list of all OVR input can be found in Unity's manual here.