microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

MixedRealityInputAction.None not filtered in MixedRealityInputSystem #5109

Closed Alexees closed 9 months ago

Alexees commented 5 years ago

Describe the bug

I'm not sure if it's a bug or by design. When using the WindowsMixedRealityController I get 2 InputUp and InputDown events. The reason for this is that Trigger Touch and Trigger Press are called, even though only Press has a proper MixedRealityInputAction assigned. I looked for the reason MixedRealityInputAction.None wasn't ignored and found that actually wasn't:

https://github.com/microsoft/MixedRealityToolkit-Unity/blob/ab6bfc0b97a59d2ba76b2f1695c43115aba3bb63/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputSystem.cs#L1051-L1058

If this is intended behavior this either means I have to filter by MixedRealityInputAction.None every single time I implement IMixedRealityInputHandler, or there is another mechanism that lets me ignore them.

To reproduce

Just debug any OnInputDown/-Up implementation and debug it with the MR Hardware. Pulling the trigger fires twice

Expected behavior

When a controller action mapping chooses MixedRealityInputAction.None, this input should be ignored

Your Setup (please complete the following information)

Target Platform (please complete the following information)

wiwei commented 5 years ago

@keveleigh, do you know if this is by design? I would expect that if a button is pressed, even if it doesn't have an input action mapping, it would still get an input down (just no associated input action). If a single trigger action leads to two things (i.e. a touch -> press) then this doesn't seem too surprising.

stale[bot] commented 4 years ago

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.

stale[bot] commented 2 years ago

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.

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!