I have been porting our software from the HoloLens 2 and a few other devices to ML2. For some reason we have been unable to get hand tracking to work correctly. The hands come into the scene and do track the user's hands, but for some reason the hands are scrambled. I posted an image of this a few months ago when this first came up. I have been jumping around from porting tasks to various headsets so I am just now getting back to this in the last 2 weeks. Rebuilt the project from the ground up, got all other features working aside from hands and one other.
So one of the errors was tracked down into MagicLeapAuxilaryHandDevice.cs line 212 -
if (HandSubsystem.TryGetPinchProgress(HandNode,
out bool isPinchReady,
out bool isPinching,
out float pinchAmount))
seemingly sometimes HandNode comes back null and the class stops so the raycast never gets run. Commenting out this if statement gets the app to the point that actually starts drawing the raycast correctly, and colliding with the UI. But cannot interact with it, obviously since this if statement handles the pinching to trigger the interaction.
We do have a build of the MRDevTemplate that works perfectly. I have gone through every single setting in the Player settings, MRTK3 settings etc. to make sure they are the same. I can't find anything in our code that would be calling the Unity Input and MRTK3 input system differently.
Any help would be appreciated.
2022.3.13f1:
ML2 OS - 1.4.1:
MLSDK 1.4.0:
Windows 11: (Windows/MacOS)
**Error messages from logs
AndroidPlayer "Ml_Magic Leap 2@ADB:GB62XT10014E:0" ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List1[T].get_Item (System.Int32 index) [0x00000] in <00000000000000000000000000000000>:0 at MixedReality.Toolkit.Input.XRSDKHandsSubsystem+XRSDKHandContainer.TryGetJoint (MixedReality.Toolkit.TrackedHandJoint joint, MixedReality.Toolkit.HandJointPose& pose) [0x00000] in <00000000000000000000000000000000>:0 at MixedReality.Toolkit.Input.MRTKHandsAggregatorSubsystem+AggregateHandContainer.TryGetJoint (MixedReality.Toolkit.TrackedHandJoint joint, MixedReality.Toolkit.HandJointPose& pose) [0x00000] in <00000000000000000000000000000000>:0 at MixedReality.Toolkit.Input.MRTKHandsAggregatorSubsystem+MRTKAggregator.TryGetPinchProgress (UnityEngine.XR.XRNode handNode, System.Boolean& isReadyToPinch, System.Boolean& isPinching, System.Single& pinchAmount) [0x00000] in <00000000000000000000000000000000>:0 at MagicLeap.MRTK.Input.MagicLeapAuxiliaryHandDevice.OnUpdate () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.InputSystem.Utilities.DelegateHelpers.InvokeCallbacksSafe (UnityEngine.InputSystem.Utilities.CallbackArray
1[System.Action]& callbacks, System.String callbackName, System.Object context) [0x00000] in <00000000000000000000000000000000>:0
** (syntax-highlighting is supported via Markdown):