Get Started with Leap Motion VR Development

Mount

Attach the Leap Motion VR Developer Mount

Lost the mount attachment instructions?     Download PDF

Note: The latest version of the Oculus firmware limits bandwidth for the DK2’s built-in USB port, which harms the controller’s performance. For now, we recommend using the free cable extender bundled with the mount to connect the controller directly to the computer. For more known issues, click here.


Try a Leap Motion VR Application

  1. Download the Leap Motion V2 SDK with Image API and enhanced head-mounted tracking. Run the installer bundled with the package.

    Important: Be sure to download the latest software. If you're running an older version, some examples will not function properly, and tracking will be less accurate.

    Open_installer
  2. Download the Oculus Rift Runtime. Run the installer.

  3. Enable Image Passthrough from the Leap Motion V2 Beta Control Panel (click “Settings…” from the system tray)

    Imageapienable
  4. Find the best configuration for you (mirroring or using extended display) in your operating system's Display settings. You also may have to experiment with the Display options (resolution, rotation) to ensure correct rotation for the screen. It may seem cumbersome at first, but you'll learn quickly how to set your VR station up.

    Displaymirrorsetting
  5. Visit the examples gallery to get the executable (and source code!) for the Leap Motion Intro VR demo, currently available for Windows.

    Vr-demo

    Using Mac? Check out the Plasma Ball VR demo.

    Plasma-ball

    Note: If you experience any tracking issues, please make sure you’re running the latest software.

Build Your First Leap Motion VR Application

  1. Before you begin, make sure that you download the Oculus Rift SDK as well as the latest version of the Leap Motion SDK.

  2. Starting with v2.1.3, you must set the policy flags POLICY_IMAGES and POLICY_OPTIMIZE_HMD to access the Image API and head-mounted tracking in your application:

    // In C++ controller.setPolicyFlags(static_cast(Leap::Controller::PolicyFlag::POLICY_IMAGES | Leap::Controller::PolicyFlag::POLICY_OPTIMIZE_HMD));
  3. If you're building your first app from scratch, be aware that the head-mounted perspective is slightly different (POLICY_OPTIMIZE_HMD) from the Leap Motion Controller's usual table setup. We have a few code examples to help you:

    • For C++, we have a source code for Leap Motion VR Intro. See it here.
    • For Unity, we provide an asset that does the transformation for you. Download it from our Unity downloads page.
    • For JavaScript, you should see the quaternion rotation done in our Light Pinch VR example.

Note: positional tracking on the DK2 is not affected by the mount – so track away!


Join the Community

Let’s create the future of VR together. Share your latest experiments and connect with fellow developers.

Visit the Community Forum

Forum