Unity

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.

Unity Assets for Leap Motion Orion BETA

Requirements:

Add-on Modules

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.
Download released version Description
Detection Examples v1.0.3

Detection Examples contains example scenes illustrating how to use the Detector scripts added to Core Assets 4.1.1. These detector scripts expand on the PinchUtility module, which has been rolled into the Core Assets and retired.

Release Notes (4.1.1)

What's New

  • 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

Archived Assets

Older versions of our Orion Assets and Modules can be found below. Be sure to use the recommended Unity and SDK versions:
Download released version Compatibility Compatible Modules
Unity Core Assets v4.2.1 Leap Motion: Orion / Oculus Rift 0.8.0+ / Unity 5.3+ / Windows  
Unity Core Assets v4.2.0 Leap Motion: Orion / Oculus Rift 0.8.0+ / Unity 5.3+ / Windows  
Unity Core Assets v4.1.6 Leap Motion: Orion / Oculus Rift 0.8.0+ / Unity 5.3+ / Windows  
Unity Core Assets v4.1.3 Leap Motion: Orion / Oculus Rift 0.8.0+ / Unity 5.3+ / Windows  
Unity Core Assets v4.1.2 Leap Motion: Orion / Oculus Rift 0.8.0+ / Unity 5.3+ / Windows  
Unity Core Assets v4.1.1 Leap Motion: Orion / Oculus Rift 0.8.0+ / Unity 5.3+ / Windows  
Unity Core Assets v4.1.0 Leap Motion: Orion / Oculus Rift 0.8.0+ / Unity 5.3+ / Windows  
Unity Core Assets v4.0.2 Leap Motion: Orion / Oculus Rift 0.8.0+ / Unity 5.3+ / Windows

Pinch Utilities v1.0.1+

Unity Core Assets v4.0.1 Leap Motion: Orion / Oculus Rift 0.8.0+ / Unity 5.3+ / Windows

Pinch Utilities v1.0.0, Foot Tracking v0.0.9-v0.1.0

Unity Core Assets v4.0.0 Leap Motion: Orion / Oculus Rift 0.8.0+ / Unity 5.3+ / Windows

link example

Unity Core Assets v3.0.0 Leap Motion v2.3.1+ / Oculus Rift 0.7.0 / Unity 5.2+ / Windows  
Download released version Description
Detection Examples v1.0.3

Detection Examples contains example scenes illustrating how to use the Detector scripts added to Core Assets 4.1.1. These detector scripts expand on the PinchUtility module, which has been rolled into the Core Assets and retired.

Detection Examples v1.0.2
Detection Examples v1.0.1
Download released version Description
Pinch Utilities v1.0.2

PinchUtility contains a basic component for detecting a pinch gesture and providing useful information about it. Other useful pinch-related components and examples are also included. Pinch demos can be found on our Developer Gallery.

Pinch Utilities v1.0.1
Pinch Utilities v1.0.0
For all archived Orion assets, check out our Unity Modules repo on GitHub. For older assets built on the Leap Motion V2 software (including OSX-compatible packages), see our Core Assets archive.

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.

Test 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.)