Class Leap::Attachments::AttachmentHands

class Leap.Attachments.AttachmentHands : public MonoBehaviour

Add an GameObject with this script to your scene if you would like to have a Transform hierarchy that will follow various important points on a hand, whether for visuals or for logic. The AttachmentHands object will maintain two child objects, one for each of the player’s hands. Use the Inspector to customize which points you’d like to see in the hierarchy beneath the individual AttachmentHand objects.

Public Functions

void SetLeapProvider (LeapProvider provider)

Allows you to set a LeapProvider to generate transforms from for attachment hands.

Properties

Func<Hand>[] handAccessors { get; set; }

Gets or sets the functions used to get the latest Leap.Hand data for the corresponding AttachmentHand objects in the attachmentHands array. Modify this if you’d like to customize how hand data is sent to AttachmentHands; e.g. a networked multiplayer game receiving serialized hand data for a networked player representation.

This array is automatically populated if it is null or empty during OnValidate() in the editor, but it can be modified freely afterwards.

AttachmentHand[] attachmentHands { get; set; }

Gets or sets the array of AttachmentHand objects that this component manages. The length of this array should match the handAccessors array; corresponding-index slots in handAccessors will be used to assign transform data to the AttachmentHand objects in this component’s Update().

This array is automatically populated if it is null or empty during OnValidate() in the editor, but can be modified freely afterwards.