Search Unity

XR Input : Inputs work fine on Oculus Rift but are not computed on HTC Vive

Discussion in 'VR' started by Anicrofmana, Oct 16, 2019.

  1. Anicrofmana

    Anicrofmana

    Joined:
    Sep 10, 2019
    Posts:
    27
    Hi everyone,

    I'm currently developping a VR Application that works both for Oculus Rift AND for HTC Vive. Obviously, I'm having a unique InputManager, that, using XR Input, should work for both device. Here is my problem :

    When I do this :

    Code (CSharp):
    1.  if (leftHandDevices.Count == 1)
    2.   {
    3.             leftHandDevices[0].TryGetFeatureValue(CommonUsages.trigger, out pressed);
    4.             Debug.Log("Pressed value = " + pressed);
    5.   }
    Oculus Rift logs the right trigger Axis value, but HTC Vive stays at 0.0f, even tho the device is valid.

    I'm getting my devices this way, and it looks like it's working fine :
    Code (CSharp):
    1. InputDevices.GetDevicesAtXRNode(XRNode.LeftHand, leftHandDevices);
    I checked the devices name and they are both OpenVR Vive Controller (Right and Left).

    I tried using the default input system by using Input.GetAxis("LeftTrigger"), mapped on the right axis, according to Unity's documentation, and the result is the same (Oculus good, Vive bad)

    It just looks like everything is ok but the trigger doesn't send anything.

    Can someone help me as I can't find a lot of help about XR Input on the internet ? This is frustrating..

    Thanks !