Manages a tracked hand, instantiates fingers and wrists. Also manages the ObjectTracking3D and creates the needed scene object hierarchy to achieve hand mesh visualization as well as landmarks tracking

Implements

Constructors

Properties

onEnabledChanged: PublicApi<boolean> = ...

Event called when this hand gets enabled or disabled

onHandFound: PublicApi<void> = ...

Event called when the hand is found by the system

onHandLost: PublicApi<void> = ...

Event called when the hand is lost by the system

onPinchCancel: PublicApi<void>

Event called when the user's pinch is canceled by the system.

onPinchDown: PublicApi<void>

Event called when the user has successfully pinched down.

onPinchUp: PublicApi<void>

Event called when the user has released pinching after they have successfully pinched down.

sceneObjectManager: ScriptScene = global.scene

Accessors

  • get enabled(): boolean
  • Returns the enabled state of the hand.

    Returns boolean

  • get handType(): "left" | "right"
  • Determines if the hand is the left or right hand

    Returns "left" | "right"

  • get isDominantHand(): boolean
  • Returns true if the hand is the dominant hand assigned by the system

    Returns boolean

  • get targetingData(): TargetingData
  • Returns the normalized direction and origin point of the targeting ray in world coordinate system It can return null if the data has not been received from LensCore's GestureModule API.

    Returns TargetingData

Methods

  • Destroys the hand and associated keypoints

    Returns void

  • Returns the roll rotation of the hand in degrees. This is the result of the dot product from a right vector, created by the index and middle knuckle, and the camera's right vector to determine if the palm if facing the user.

    A value less than 30 is facing towards the user. A value greater than 30 is facing away from the user.

    Returns null if the hand is not being tracked.

    Returns number

  • Approximates the center of the palm, as we currently do not have a center palm landmark. Used to determine whether hands are overlapping

    Returns vec3

    the calculated center or null if any of the landmarks don't exist

  • Returns the pitch rotation of the hand in degrees. This is the result of the dot product from a forward vector, created by the middle knuckle and wrist, and the camera's forward vector.

    A value greater than 0 is pointing up. A value less than 0 is pointing down.

    Returns null if the hand is not being tracked.

    Returns number

  • Returns a direction quaternion based on a plane derived from a forward direction (between your thumb knuckle to thumb tip) and a right direction (between your thumb knuckle to index knuckle)

    Returns quat

  • Returns a normalized value from 0-1, where 0 is the distance from a finger tip to the thumb tip in resting/neutral hand pose. 1 is when a finger tip to thumb tip are touching/pinching. Returns null if the hand is not tracked

    Returns number

  • Determines if the hand's palm is facing the user

    Returns boolean

  • Determines if the hand is aiming towards objects in the scene

    Returns boolean

  • Determines if the user is pinching

    Returns boolean

  • Determines if the system is able to track the BaseHand

    Returns boolean

  • Sets the enabled state of the hand. Events will not be called if isEnabled is set to false.

    Parameters

    • isEnabled: boolean

    Returns void

  • Sets isDominantHand. This is used from HandInputData based on Lens Tweak value, and shouldn't be accessible by external developers.

    Parameters

    • isDominantHand: boolean

      describes if this hand is the dominant one or not

    Returns void

  • Parameters

    Returns void