Blueprint Reference¶
Function Library¶
Nodes in the function library are available in all Blueprint constructor and event graphs.
Get All Hands Ids¶
Gets all the ids of detected hands. The Leap Motion service assigns a new id every time a hand is newly detected, so a given physical hand can be represented by a different virtual hand with a different id at different times.
| Out: | All Hands Ids | An array containing the Ids of all the tracked hands. |
| Returns: | Boolean | False if the Leap Motion controller is not connected. |
Get Bone Position and Orientation¶
Gets the position and orientation of a bone of the hand with respect to the position and orientation of the world origin.
| In: | Hand Id | The id of the hand containing the bone of interest. |
| Leap Bone | The name of the bone. The palm is included with the other bones for the purposes of this function. | |
| Out: | Position | The offset of the distal end of the bone from (0, 0, 0). |
| Orientation | The transform of the bone with respect to the orientation of the Unreal world coordinate axes. | |
| Returns: | Boolean | True if there is a valid hand object with the specified id; false, otherwise. |
Get Bone Width and Length¶
The length and width of the bone.
| In: | Hand Id | The id of the hand containing the bone of interest. |
| Leap Bone | the name of the bone. The palm is included with the other bones for the purposes of this function. | |
| Out: | Width | The width of the body part containing the bone. |
| Length | The length of the body part containing the bone. | |
| Returns: | Boolean | True if there is a valid hand object with the specified id; false, otherwise. |
Get Grab Strength¶
The grab strength of a hand increases from zero as the hand forms a fist to a maximum value of one.
| In: | Hand Id | The id of the hand of interest. |
| Out: | Grab Strength | A value between 0 and 1. |
| Returns: | Boolean | True if there is a valid hand object with the specified id; false, otherwise. |
Get Pinch Strength¶
The pinch strength of a hand increases from zero as the any fingertip approaches the tip of the thumb, reaching a maximum value of one. Note that pinching is not distinct from grabbing; typically the pinch value increases during grabbing.
| In: | Hand Id | The id of the hand of interest. |
| Out: | Pinch Strength | A value between 0 and 1. |
| Returns: | Boolean | True if there is a valid hand object with the specified id; false, otherwise. |
Leap Motion Controller Actor/Component Nodes¶
The following nodes are defined by the Leap Motion Controller Actor and component.
Get All Hand Actors¶
Gets all LeapMotionHandActor objects associated with this Leap Motion Controller Component.
| In: | Target | A reference to a Leap Motion Controller Component instance. |
| Out: | Hand Actors | An array containing references to the hand actor objects. |
Get Hand Actor¶
Gets the child Leap Motion Hand Actor object associated with a Leap Motion hand ID.
| In: | Target | A reference to a Leap Motion Controller Component instance. |
| Hand Id | the id of the hand of interest. | |
| Returns: | LeapMotionHandActor | A reference to the Hand Actor object with the specified hand id. |
Get All Hand Ids¶
Gets all the hand Ids.
| In: | Target | A reference to a Leap Motion Controller Component instance. |
| Out: | Hand Ids | An array containing all the hand ids. |
Get Oldest Left or Right Hand Actor¶
Gets the child Hand Actor for either the left or the right hand that has been tracked by the Leap Motion controller for the longest amount of time. Using the oldest hand object helps prevent interference if someone else inserts their hand into the field of view.
| In: | Target | A reference to a Leap Motion Controller Component instance. |
| Leap Side | Whether to get the right or left hand. |
Use HMD Mode¶
Sets this controller object to HMD mode. HMD mode rotates the hands and projects them in front of the Controller Actor object rather than above it. It also sets the Leap Motion tracking to HMD mode, which is optimized to detect hands when the controller hardware is attached to a head-mounted display.
Although only the current Actor object is transformed when you execute this function, all controllers receive the same tracking data. Thus, you won’t get good results when your level contains multiple active controller actors in different modes.
| In: | Target | A reference to a Leap Motion Controller Component instance. |
| Enable or Disable | Set to True or check to enable HMD mode. |
Leap Motion Hand Actor Nodes¶
Leap Motion Hand Actor objects are created by the Controller Actor whenever a hand is detected in the Leap Motion field of view and destroyed when tracking of that hand is lost (usually when the user withdraws his or her hand from the field of view). You can access the hand actors from their parent controller. Hand actors do not have their own position. Get positions from a bone actor. For example, you can use the position for the palm bone as the general position of the hand.
Get Bone Actor¶
Gets the LeapMotionBoneActor instance for the specified bone.
| In: | Leap Bone | The name of the bone from ELeapBone |
| Out: | Bone Actor object | The bone actor instance for the bone. |
Get Parenting Controller Component¶
Gets the Leap Motion Controller component that spawned the target hand actor.
| Out: | Leap Motion Controller Component | the parent controller component. |
Get/Set Show Mesh¶
Controls whether the bone mesh objects are rendered.
| Type: | Boolean | True to show mesh. |
Get/Set Show Collider¶
Controlls whether the bone colliders are rendered.
| Type: | Boolean | True to show colliders. |
Get Grab Strength¶
The grab strength reported for this hand. Grab strength is a value between 0 and 1 rating how strongly a hand is “grabbing.”
| Type: | float | A value between 0 and 1 |
Get Hand Id¶
The Leap Motion id assigned to this hand. The id changes each time a hand is recognized by the Leap Motion device, even though it might be the same physical hand.
| Type: | integer |
Get Pinch Strength¶
The pinch strength reported for this hand. Pinch strength is a value between 0 and 1 rating how strongly the thumb and any single finger of a hand is “pinching.” Note that there is often overlap between pinching and grabbing.
| Type: | float | A value between 0 and 1 |
Show Arm¶
The setting controlling whther the arm bone of this hand is rendered.
| Type: | Boolean | True to show arm. |
Leap Motion Bone Actor Nodes¶
Leap Motion Bone Actor objects are created by the Hand Actor when that hand is created and destroyed along with that hand actor. You can access the bone actors from their parent hand actor. Bone actors contain the position and orientation information for each part of the hand, converted into the Unreal coordinate system. The bone actors are positioned relative to both the controller and the parent hand actor. However, by default, the transform from the controller to the hand actor is the identity transform; it will only vary if your application changes it.
Get/Set Primitive Component¶
The Unreal Primitive Component used for this part of the hand.
| Type: | PrimitiveComponent | An Unreal primitive component instance. |
Get/Set Show Collider¶
Whether to render the collider for this part of the hand.
| Type: | Boolean | True to show collider. |
Get/Set Static Mesh Component¶
The static mesh component used for this part of the hand.
| Type: | StaticMeshComponent | An Unreal StaticMeshComponent instance. |
Get Parenting Controller Component¶
The Leap Motion Controller component that spawned the hand which spawned the target bone.
| Type: | LeapMotionControllerComponent | The parent controller component. |
Init¶
A virtual function you can implement to override how bone actors are created.
| In: | Leap Bone | The type of bone (from ELeapBone enumeration) |
| Scale | The setting for the hand scale. | |
| Width | The measured width of the part of the hand represented by this bone. Should be multiplied by the scale setting. | |
| Length | The measured length of the part of the hand represented by this bone. Should be multiplied by the scale setting. | |
| Show Collider | The current state of the controller’s Show Collider setting. | |
| Show Mesh | The current state of the controller’s Show Mesh setting. |
Note: Only the length and width of bones are measured by the Leap Motion API. For the finger and arm bones, you can use the width value for thickness as well. For the palm bone, you can derive a suitable value from one of the supplied values (i.e. 20% of the palm width).
Events¶
A controller dispatches events when a hand is detected, updated, or removed from the game.
OnHandAdded Event¶
Dispatched when a hand is added to the scene.
| Out: | Hand id | the id of the new hand. |
OnHandUpdated Event¶
Dispatched every tick while a hand is tracked.
| Out: | Hand Id | the id of the updated hand. |
| Delta Seconds | seconds since last update |
OnHandRemoved Event¶
Dispatched when a hand is removed from the scene.
| Out: | Hand Id | the id of the removed hand. |