Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Can't get thumbstick readings on Quest 2.

Discussion in 'XR Interaction Toolkit and Input' started by st_Drunks, Feb 7, 2021.

  1. st_Drunks

    st_Drunks

    Joined:
    Nov 8, 2018
    Posts:
    9
    I'm building a project on unity 2020.2.3
    Using the native XR Management plugin as well as the new input system.

    All the tracking, buttons and triggers on my Quest controllers work fine apart from any interactions related to thumbsticks. It seems like there isn't a way to access it's vector2 position, clicking and touching states.

    Even in the input debugger never shows these values change from their default states.

    Is it a bug or am I doing something wrong?

    I tried referencing thumbsticks as primary2dAxis, thumbsticks and trackpads in action bindings but with no luck.

    Just in case: To run apps on Quest I upload android builds directly to the device, or use Virtual Desktop to run apps in the editor on PC, and the issue persists either way.
     
  2. Simianosaurus

    Simianosaurus

    Joined:
    Feb 14, 2013
    Posts:
    14
    I have managed to get the Vector2 from the primary2DAxis of the thumbstick on my Quest 2 with this:

    Members:
    public XRNode inputSource;
    private Vector2 inputAxis;



    In the Update:
    InputDevice device = InputDevices.GetDeviceAtXRNode( inputSource);
    device.TryGetFeatureValue(CommonUsages.primary2DAxis, out inputAxis);


    Then in the inspector, I just had to link the inputSource to the device I wanted to track (i.e. 'Left Hand')

    Not sure if that helps, but I hope it does.
     
  3. st_Drunks

    st_Drunks

    Joined:
    Nov 8, 2018
    Posts:
    9
    Sadly, this did not do it.

    I've tried your code, but I still get no primary2dAxis input from quest.

    It does work for Vive though, but so does the action based approach. So it's not an issue of the code itself.

    I believe the issue has deeper roots. The most worrying thing is that even the input debugger does not respond to the thumbstick. It responds to everything, but the thumbstick.

    Are you using openXR, oculus plugin & integration packages too?

    Also, thanks for the help anyway =)
     
  4. Simianosaurus

    Simianosaurus

    Joined:
    Feb 14, 2013
    Posts:
    14
  5. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    Are you using SteamVR with oculus? as this is a known SteamVR issue. If you're not please raise a bug.