-
Notifications
You must be signed in to change notification settings - Fork 162
Input Modules꞉ LeapMotion
This module converts fingertips and palms into cursors. It references the "Orion" SDK, which is not compatible with previous versions. The module's main component provides properties for using stabilized positions and for extending cursors beyond the ends of the fingers.
📷 Cursors attached to specific points on the LeapMotion hands
This animation shows all the available cursors enabled simultaneously. A more common usage would be to enable only one or two cursors per hand.
This input module is compatible with the Leap Motion Core Assets v4.4.0+ SDK, with legacy support for Core Assets v3 through v4.3.4.
The input module scene is named HoverInputModule-LeapMotion, located in the /Assets/Hover/InputModules/LeapMotion/Scenes
folder. An alternative scene with support for legacy Core Assets versions (with the "LMHeadMountedRig" prefab) is named HoverInputModule-LeapMotion-Pre-4-4-0, located in the same folder.
See the Input Modules page for details about loading input module scenes and defining symbols. To install this input module via its pre-built scene:
- Attach the
HoverSceneLoader
component to an object.- For the "Scene Folder Path" and "Scene Name" properties, replace the "NAME" placeholder text with "LeapMotion".
- To load the scene before runtime, click the "Reload Scene" button.
- Define the
HOVER_INPUT_LEAPMOTION
symbol.
To install this module manually:
- Add the LMHeadMountedRig prefab to the scene.
- Attach the
HoverInputLeapMotion
component to the prefab's root object. - Define the
HOVER_INPUT_LEAPMOTION
symbol.
📷 The HoverInputLeapMotion
component
- The "Cursor Data Provider" property will automatically attempt to find the
HoverCursorDataProvider
component (in the HoverKit prefab). - The "Leap Service Provider" and "Look Cursor Transform" properties will be set automatically.
- The "Use Stabilized Positions" property enables smoother cursor motion, but introduces lag.
- The "Extend Fingertip Distance" property pushes the cursors outward from the fingertips, in the forward-pointing direction of the finger.
📷 All cursors set to "Is Raycast" mode
This animation shows all the available cursors projecting raycast lines. Typically, a scene the requires raycast functionality would enable only one cursor per hand. Note that the "Palm" cursors use the hand's forward direction (which is perpendicular to the palm normal) as their raycast direction.
General
Features
Modules
Other