Trigger press in WMR controller causes Xbox controller to raise trigger events too
Overview
- Add the attached MyFloatHandler script to a scene setup for MRTK
- Run the scene in WMR with an Xbox controller connected
- Press the trigger in a WMR controller and observe how OnInputChanged() in MyFloatHandler is called three times: once from the WMR controller and twice from the Xbox one.
This is happening because we have Unity input axes configured to read from all joysticks. We read the WMR controller trigger value via UnityEngine.XR.WSA.Input.InteractionSourceState but it is also reported as a joystick axis, so it gets picked up by our Xbox controller.
A solution would be to define different axes for different joystick numbers and decide at runtime the axes our Xbox controller will read from depending on its joystick number.
Unity Editor Version
2018.3.9f1
Mixed Reality Toolkit Release Version
mrtk_development
@luis-valverde-ms assigning to you for the time being. Please let us know if there's a more appropriate owner.
This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.
This issue has been closed by an automated process because it is stale. If this is still an issue please add a new comment with more recent details and repro steps.