The Unity game engine includes built-in support for VR development. To start building with Leap Motion Orion, make sure you have Unity 5.3 installed. Setup instructions and older asset versions can be found below. To upgrade your older project to Orion, check out our upgrade guide.
Unlock new possibilities in your Orion project with Modules – powerful extensions built on top of our Unity Core Assets. These modules are dependent on the latest version of the Core Assets. Learn more about our new workflow and roadmap for Modules on the blog. For older Module releases, see our Archived Assets.
Release Notes (4.1.1)
- Greater robustness to cluttered backgrounds and ambient light interference
- Enhanced tracking range that extends to the full length of your arms
- Faster and better initialization for all hands
- Lower latency
- Significantly improved grab-and-drop interactions
- Lower overall CPU usage
- Much better finger flexibility allowing for better poses
- Better tracking on the edge of the field of view
Older versions of our Orion Assets and Modules can be found below. Be sure to use the recommended Unity and SDK versions:
Quick Setup Guide
Setting Up the Core Assets
- Ensure that you have the Leap Motion Orion software and the Oculus 1.3 runtime (if applicable) installed.
- Download the Unity Core Assets (see above).
- In Unity, go to File and click New Project…
- Name your project and click Create Project.
- Right-click in the Assets window, go to Import Package and click Custom Package…
- Find the Core Unity package and import it.
- From there, you’ll see three folders in the Assets window – the Plugins folder and LeapC folder which contain all of our API bindings, and the LeapMotion folder, which contain all of our Prefabs, Scripts, and Scenes.
- In the LeapMotion/Scenes folder the Leap_Hands_Demo scene provides a basic example of Leap Motion hands in a Unity scene.
- In the LeapMotion/Scenes folder the Leap_Hands_Demo_VR scene provides a basic example of Leap Motion hands in a VR Unity scene with Leap Motion video passthrough. Be sure to enable VR support in Edit/Project Settings/PlayerSettings/OtherSettings/Virtual Reality Supported. Video passthrough can be toggled by enabling or disabling the QuadBackground GameObject’s transform in the Inspector.
The instructions below explain how to recreate these scenes from scratch. But you can use these existing scenes as starting points for creating new experiences.
Setting up a Basic Leap Motion VR Scene
- Follow our VR Setup.
- Once you’ve set up the Core Assets (see above), go to LeapMotion/Prefabs in the Asset window.
- From LeapMotion/Prefabs, drag a LMHeadMountedRig into your scene.
- In the hierachy for the LMHeadMountedRig, you see a LeapHandController.
- From the LeapMotion/Prefabs/HandModelsNonhuman folder, drag a CapsuleHand_L and a CapsuleHand_R to your scene hierarchy window and make them children of the LeapHandController.
- From the LeapMotion/Prefabs/HandModelsPhysical folder, drag a RigidRoundHand_L and a RigidRoundHand_R to your scene hierarchy window and make them children of the LeapHandController.
- Locate the HandPool component attached to the LeapHandController. Set the Model Collection value to 4. Then move your two graphics hands and two physics hands from the Hierarchy view to the four empty slots.
- On the LeapHandController GameObject you’ll see a LeapProvider component. For VR, make sure that “Is Head Mounted” is enabled.
- Be sure to enable VR support in Edit/Project Settings/PlayerSettings/OtherSettings/ Virtual Reality Supported.
- Video passthrough can be toggled by enabling or disabling the QuadBackground GameObject’s transform in the Inspector.
- You can then add a directional light (from the Create menu on the upper left) to illuminate the hands.
- You can also add objects into the scene and put them near the controller. To interact with the objects, click on the Cube, then Add Component, and add Rigidbody. Be sure to disable gravity so that the object doesn’t fall away (you’ll see this in the Rigidbody properties.)