InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

[XR] WMR - Some actions (Grip and trigger) are called multiple time after pressing the menu button

Open KospY opened this issue 7 years ago • 1 comments

Some actions (grip and trigger confirmed) are called multiple time after going into the WMR menu. Strangely, this issue happen only on the right controller.

To reproduce, use the code below and check the debug lines after pressing quickly the trigger before and after going into the menu. Before going into menu you will get one line for each . After going into the menu 2 lines After going into the menu again 3 lines Etc...

void Start()
{
         triggerRInput = new InputAction(binding: "/<XRController>{rightHand}/{Trigger}";
         triggerRInput.Enable(); 
         triggerRInput.performed += OnInputTriggerR; 
         triggerRInput.cancelled += OnInputTriggerR
}

void OnInputTriggerR(InputAction.CallbackContext context)
        {
            float value = ((AxisControl)(context.control)).ReadValue();
            float previousValue = ((AxisControl)(context.control)).ReadValueFromPreviousFrame();
            Debug.Log("OnInputTriggerR" + previousValue + " | " + value);
        }

Tested on Samsung Odyssey+ Last repo update (2019-02-08) Unity 2018.3.2

KospY avatar Feb 08 '19 10:02 KospY

Closing. For it is filed in database.

JiaUnity avatar Apr 09 '19 22:04 JiaUnity