Skip to content
LeapMotionInputForMRTK simulates hand inputs for MRTK with Leap Motion
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Assets update MRTK from RC1 to RC2.1 Jun 18, 2019
External update MRTK from RC1 to RC2.1 Jun 18, 2019
ProjectSettings first commit May 24, 2019
.gitignore first commit May 24, 2019
License.txt first commit May 24, 2019 Update MRTK version Jun 18, 2019


LeapMotionInputForMRTK simulates hand inputs for MRTK with Leap Motion.

Demo video

Demo video


Getting Started

1.A. Clone this repository

> git clone --recursive
> cd LeapMotionInputForMRTK
> External\createSymlink.bat

Open LeapMotionInputForMRTK project with Unity 2018.3.x.

1.B. Import unitypackage

Create project with Unity 2018.3.x.

Import MRTK v2

Download and import MRTK v2 unitypackages.

  • Microsoft.MixedReality.Toolkit.Unity.Examples-v2.0.0-RC2.1.unitypackage
  • Microsoft.MixedReality.Toolkit.Unity.Foundation-v2.0.0-RC2.1.unitypackage

Import LeapMotionInputForMRTK

Download and import the latest LeapMotionInputForMRTK unitypackage.

2. Import Leap Motion Core Assets

Download "Unity Core Assets" and import to the unity project.

3.A. Open sample scene

Open Assets/LeapMotionInputSimulation/Scenes/SampleScene.

3.B. Create new scene

When creating new scene, MRTK settings window pops up.
Drag and drop Assets\LeapMotionInputSimulation\LeapMotionMixedRealityToolkitConfigurationProfile.asset to the window and press "Yes".


After the scene is loaded, select "Main Camera" in Hirerarchy and add LeapXRServiceProvider component.


Enable Hand Mesh

If you want to enable Hand Mesh, attach HandModelManager script to "Main Camera".
Edit the component like the following picture.
LoPoly Rigged Hand prefabs are in Assets\LeapMotion\Core\Prefabs\HandModelsNonHuman folder.


4. Fix MRTK v2

There is a bug in MRTK v2.

To fix the bug, edit Assets\MixedRealityToolkit\Providers\Hands\BaseHandVisualizer.cs.


if (handMeshFilter != null)
    Mesh mesh = handMeshFilter.mesh;

    if((mesh.vertices?.Length ?? 0) != 0 && 
        mesh.vertices?.Length != eventData.InputData.vertices?.Length)
    mesh.vertices = eventData.InputData.vertices;
    mesh.normals = eventData.InputData.normals;
    mesh.triangles = eventData.InputData.triangles;

    if (eventData.InputData.uvs != null && eventData.InputData.uvs.Length > 0)
        mesh.uv = eventData.InputData.uvs;


    handMeshFilter.transform.position = eventData.InputData.position;
    handMeshFilter.transform.rotation = eventData.InputData.rotation;

5. Switch platform

In the Build Settings window, switch platform to Universal Windows Platform.

6. Mount Leap Motion on HoloLens (1st gen)

Mount Leap Motion on HoloLens like the following picture.
3D Printable Models


Adjust the offset and tilt values.


7. Play in Unity Editor

On your HoloLens, start the Holographic Remoting Player app.

In Unity, select "Window > XR > Holographic Emulation".
Enter the IP address of your HoloLens and press Connect button.


Press Play button in Unity Editor.


Furuta, Yusuke (@tarukosu)



You can’t perform that action at this time.