Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HandConstraintBehavior

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

Hierarchy

  • HandConstraintBehavior

Implements

Index

Constructors

constructor

  • Builds a hand constraint behavior

    Returns HandConstraintBehavior

Properties

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 right 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

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

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