MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

PointerBehavior.Default does not reset pointer behavior

Open ARGs-code opened this issue 3 years ago • 1 comments

Describe the bug

Trying to change pointer behavior via PointerUtils from PointerBehavior.AlwaysOff to PointerBehavior.Default does not return pointer behavior to the MRTK default.

To reproduce

Steps to reproduce the behavior:

Use this simple function to toggle your pointers: public void CursorToggle(bool value) { if (value) { PointerUtils.SetHandGrabPointerBehavior(PointerBehavior.Default); PointerUtils.SetGazePointerBehavior(PointerBehavior.Default); PointerUtils.SetHandPokePointerBehavior(PointerBehavior.Default); PointerUtils.SetHandRayPointerBehavior(PointerBehavior.Default); PointerUtils.SetMotionControllerRayPointerBehavior(PointerBehavior.Default); PointerUtils.SetPointerBehavior<GGVPointer>(PointerBehavior.Default); } else { PointerUtils.SetHandGrabPointerBehavior(PointerBehavior.AlwaysOff); PointerUtils.SetGazePointerBehavior(PointerBehavior.AlwaysOff); PointerUtils.SetHandPokePointerBehavior(PointerBehavior.AlwaysOff); PointerUtils.SetHandRayPointerBehavior(PointerBehavior.AlwaysOff); PointerUtils.SetMotionControllerRayPointerBehavior(PointerBehavior.AlwaysOff); PointerUtils.SetPointerBehavior<GGVPointer>(PointerBehavior.AlwaysOff); } }

Observe that passing false turns off all pointers as expected. Observe that passing true does not turn the pointers back on, in fact they all appear to remain off no matter what.

Expected behavior

Pointer behavior should revert to Default behavior when PointerUtils PoointerBehavior.Default is called on a given pointer.

Your setup (please complete the following information)

  • Unity Version [e.g. 2020.3.11f1]
  • MRTK Version [e.g. v2.8.2.0]

Target platform (please complete the following information)

  • HoloLens 2

Additional context

We need this capability because for certain actions and behaviors we want the user to only use their eye gaze. The other pointers are distracting when this is needed so we turn them off. In other aspects of the application we need to have the pointer's visual cues available for other interactions.

ARGs-code avatar Dec 12 '22 14:12 ARGs-code

Hey @RogPodge, looks like an MRTKv2 pointer mediation problem, if you'd like to take a peek!

Zee2 avatar Dec 14 '22 18:12 Zee2

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!

IssueSyncBot avatar Jan 13 '24 00:01 IssueSyncBot