Search Unity

Question XRI RightHand/Move always [0,0]

Discussion in 'XR Interaction Toolkit and Input' started by mcbauer, Apr 27, 2022.

  1. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Hello devs, I'm trying to map the joysticks for the OQuest2 joysticks, and I have what I need working with the Left joystick, but the Right one is always zero.

    any ideas as to what might cause this?


    Code (CSharp):
    1.  
    2. public InputActionReference rightHandActionReference = null;
    3. public InputActionReference leftHandActionReference = null;
    4. Vector2 rightInputValues;
    5. Vector2 leftInputValues;
    6.  
    7. void Update()
    8.     {
    9.         rightInputValues = rightHandActionReference.action.ReadValue<Vector2>();
    10.         print(rightInputValues); /// always zero
    11.  
    12.         leftInputValues = leftHandActionReference.action.ReadValue<Vector2>();
    13.         print(leftInputValues); /// always actual values
    14. }
    15.  
    I have gone through the Input Actions asset and verified both XRI LeftHand/Move and XR RightHand/Move are identical
     
  2. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    so the issue was the RightHand/Move actually didnt have any bindings, I kept comparing the TURN instead of MOVE, weird that it wasn't bound by default... oh well.