Search code examples
mrtk

Attaching items to the hands


We want to attach some UI and other items to the back of the articulated hand. Just trying to figure out how to do that. I have found how to turn on and off the hand visualizer through MixedRealityHandTrackingProfile but I'm trying to find the Unity Game Object I can parent the items to or at least a way to access the hand transform. Thanks for any pointers!


Solution

  • Step 1: Select the object in the scene hierarchy that you want to follow your hand. Click “add component” in the inspector panel.

    Step 2: Type in “RadialView” in the search box and you should see the RadialView solver appear. Click on it. You will see a few additional required scripts appear automatically. Note: it adds the solver handler script. Along with that, the Radial View script will show up as well just like the orbital script.

    Step 3: Change the radial view to not follow the head but follow the left hand. Select the dropdown menu next to the “tracked object to reference” option. Then select “hand joint left” from the menu.

    Step 4: As you may see, once you select the hand joint you can choose which part of the hand you want the cube to follow. There are a lot of options to use! For this example, we are going to use the wrist. So next to the option “tracked hand joint” click the dropdown menu and select wrist. Note: Not all joints, in this current version of the HoloLens2 can be tracked. This is a bug that may be fixed in the near future.

    Now if you press play and try it out in your scene, you will see that the object does follow the wrist, but the object may lag a little bit behind and looks like it’s struggling to keep up. Now to fix this and make it so that the object is with the wrist at all time we must change a few things. Set the maximum and minimum distances to 0 so that the cube will not have any distance between it and the user’s wrist. Once set, the cube will be perfectly aligned with the wrist.