Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HandConstraintBehavior

Hand constraint behavior that makes the attached TransformNode follow hands in XR experiences.

since

5.0.0

Hierarchy

  • HandConstraintBehavior

Implements

Index

Constructors

constructor

  • Builds a hand constraint behavior

    Returns HandConstraintBehavior

Properties

gazeProximityRadiusSearch playground for gazeProximityRadius

gazeProximityRadius: number

The radius in meters around the center of the hand that the user must gaze inside for the attached node to be enabled and appear. Used with HandConstraintVisibility.GAZE_FOCUS

handConstraintVisibilitySearch playground for handConstraintVisibility

handConstraintVisibility: HandConstraintVisibility

Sets the HandConstraintVisibility level for the hand constraint

handednessSearch playground for handedness

handedness: XRHandedness

Set the hand this behavior should follow. If set to "none", it will follow any visible hand (prioritising the left one).

lerpTimeSearch playground for lerpTime

lerpTime: number

Rate of interpolation of position and rotation of the attached node. Higher values will give a slower interpolation.

nodeOrientationModeSearch playground for nodeOrientationMode

nodeOrientationMode: HandConstraintOrientation

Orientation mode of the node attached to this behavior

palmUpStrictnessSearch playground for palmUpStrictness

palmUpStrictness: number

A number from 0.0 to 1.0, marking how restricted the direction the palm faces is for the attached node to be enabled. A 1 means the palm must be directly facing the user before the node is enabled, a 0 means it is always enabled. Used with HandConstraintVisibility.PALM_UP

targetOffsetSearch playground for targetOffset

targetOffset: number

Offset distance from the hand in meters

targetZoneSearch playground for targetZone

targetZone: HandConstraintZone

Where to place the node regarding the center of the hand.

zoneOrientationModeSearch playground for zoneOrientationMode

zoneOrientationMode: HandConstraintOrientation

Orientation mode of the 4 zones around the hand

Accessors

name

  • get name(): string
  • gets or sets behavior's name

    Returns string

Methods

attachSearch playground for attach

  • Attaches the hand constraint to a TransformNode

    Parameters

    Returns void

detachSearch playground for detach

  • detach(): void
  • Detaches the behavior from the TransformNode

    Returns void

disableSearch playground for disable

  • disable(): void
  • Disable the behavior

    Returns void

enableSearch playground for enable

  • enable(): void
  • Enable the behavior

    Returns void

initSearch playground for init

  • init(): void
  • Initializes the hand constraint behavior

    Returns void

linkToXRExperienceSearch playground for linkToXRExperience

  • Links the behavior to the XR experience in which to retrieve hand transform information.

    Parameters

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method