InputSystem
InputSystem copied to clipboard
[XR] WMR - Some actions (Grip and trigger) are called multiple time after pressing the menu button
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
Closing. For it is filed in database.