Class Leap::Unity::Interaction::InteractionHand

class Leap.Unity.Interaction.InteractionHand : public Leap.Unity.Interaction.InteractionController

Public Functions

void FillBones (Hand inHand)

A utility function that sets a Hand object’s bones based on this InteractionHand. Can be used to display a graphical hand that matches the physical one.

virtual override Vector3 GetGraspPoint ()

Returns approximately where the controller is grasping the currently-grasped InteractionBehaviour. Specifically, returns the average position of all grasping fingertips of the InteractionHand.

This method will print an error if the hand is not currently grasping an object.

virtual override void SwapGrasp (IInteractionBehaviour replacement)

Seamlessly swap the currently grasped object for a replacement object. It will behave like the hand released the current object, and then grasped the new object.

This method will not teleport the replacement object or move it in any way, it will just cause it to be grasped. That means that you will be responsible for moving the replacement object into a reasonable position for it to be grasped.

Public Members

bool[] enabledPrimaryHoverFingertips = new bool[5] { true, true, true, false, false }

Set slots to true to consider the corresponding finger’s fingertip for primary hover checks. 0 is the thumb, 1 is the index finger, etc. Generally speaking, enable the fingertips you’d like users to be able to use to choose and push a button, but keep in mind you pay distance check costs for each fingertip enabled!


LeapProvider leapProvider { get; set; }

If the hand data mode for this InteractionHand is set to Custom, you must also manually specify the provider from which to retrieve Leap frames containing hand data.

Func<Leap.Frame, Leap.Hand> handAccessorFunc { get; set; }

If the hand data mode for this InteractionHand is set to Custom, you must manually specify how this InteractionHand should retrieve a specific Hand data object from a Leap frame.

overridebool isTracked { get; set; }

Gets whether the underlying Leap hand is currently tracked.

overridebool isBeingMoved { get; set; }

Gets whether the underlying Leap hand is currently being moved in worldspace.

Hand leapHand { get; set; }

Gets the last tracked state of the Leap hand.

Note for those using the Leap Graphical Renderer: If the hand required warping due to the nearby presence of an object in warped (curved) space, this will return the hand as warped from that object’s curved space into the rectilinear space containing its colliders. This is only relevant if you are using the Leap Graphical Renderer to render curved, interactive objects.

overridebool isLeft { get; set; }

Gets whether the underlying tracked Leap hand is a left hand.

overrideVector3 position { get; set; }

Gets the last-tracked position of the underlying Leap hand.

overrideQuaternion rotation { get; set; }

Gets the last-tracked rotation of the underlying Leap hand.

overrideVector3 velocity { get; set; }

Gets the velocity of the underlying tracked Leap hand.

overrideControllerType controllerType { get; set; }

Gets the controller type of this InteractionControllerBase. InteractionHands are Interaction Engine controllers implemented over Leap hands.

overrideInteractionHand intHand { get; set; }

Returns this InteractionHand object. This property will be null if the InteractionControllerBase is not ControllerType.Hand.

HeuristicGrabClassifier grabClassifier { get; set; }

Handles logic determining whether a hand has grabbed or released an interaction object.