Search Unity

Question OVRInput doesn't work with Vive

Discussion in 'VR' started by Valtiel_, Apr 30, 2022.

  1. Valtiel_

    Valtiel_

    Joined:
    Jul 27, 2013
    Posts:
    9
    Hi everyone.

    I'm trying to get input from the Vive controllers following this guide
    https://developer.oculus.com/documentation/unity/unity-cross-platform-dev/

    Tracking works nicely for headset and controllers. (I use the XROrigin and TrackedPoseDriver component from XR Interaction Toolkit)

    Both OpenVR (this : https://github.com/ValveSoftware/unity-xr-plugin/releases/tag/v1.1.4) and OVR are added to the Unity XR settings

    but somehow I only get "false" when I try to get any input, even if the controllers are detected nicely
    OVRInput.GetConnectedControllers() report LTouch ,RTouch or both Touch.

    I've tried these kind of methods
    OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, OVRInput.Controller.RTouch); (The right input given by the documentation to get the hand trigger)
    OVRInput.Get(OVRInput.Button.PrimaryHandTrigger, OVRInput.Controller.RTouch)

    Does someone already manage to achieve this multi platform input using only OVR. Did you do something in particular ?

    Some people just say that it should works, just like that. I don't know what I'm missing.