Mixedrealitytoolkit-unity: Leap Motion On First Hand Detected just triggers once

Created on 19 Aug 2020  路  3Comments  路  Source: microsoft/MixedRealityToolkit-Unity

Describe the bug

On HandMenuExamples scene the menu is shown just the first time a hand is visible either right or left. When the hand is lost, next time hand is visible events are not triggered (OnFirstHandDetected).

To reproduce

Steps to reproduce the behavior:

I made a video to reproduce the behavior : https://youtu.be/RHVzJyh0Jko

Expected behavior

I expect that the menu is visible every time a PalmUp happens and that the OnFirstHandDetected will reset when a hand is not visible.

Screenshots

https://youtu.be/RHVzJyh0Jko

Your setup (please complete the following information)

  • Unity Version 2019.4.7f1
  • MRTK Version 2.4.0

Target platform (please complete the following information)

  • OpenVR with LeapMotion

Additional context

I am just running the example from MRTK2

Bug Leap Motion

Most helpful comment

I literally just found the fix for this and was going to report the bug!

Changing line 239 in LeapMotionDeviceManager.cs from:

CoreServices.InputSystem.RaiseSourceLost(trackedHands[handedness].InputSource);

to:

CoreServices.InputSystem.RaiseSourceLost(trackedHands[handedness].InputSource, trackedHands[handedness]);

fixed it for me. The controller was never getting removed when the source was lost.

All 3 comments

I literally just found the fix for this and was going to report the bug!

Changing line 239 in LeapMotionDeviceManager.cs from:

CoreServices.InputSystem.RaiseSourceLost(trackedHands[handedness].InputSource);

to:

CoreServices.InputSystem.RaiseSourceLost(trackedHands[handedness].InputSource, trackedHands[handedness]);

fixed it for me. The controller was never getting removed when the source was lost.

@cpaganucci thanks ! I'll give it a try.

@CDiaz-MS FYI

Was this page helpful?
0 / 5 - 0 ratings