Class HandConstraintBehavior
Hierarchy
- HandConstraintBehavior
Implements
Index
Constructors
constructor
Builds a hand constraint behavior
Returns HandConstraintBehavior
Properties
gaze Proximity RadiusSearch playground for gazeProximityRadius
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
hand Constraint VisibilitySearch playground for handConstraintVisibility
Sets the HandConstraintVisibility level for the hand constraint
handednessSearch playground for handedness
Set the hand this behavior should follow. If set to "none", it will follow any visible hand (prioritising the left one).
lerp TimeSearch playground for lerpTime
Rate of interpolation of position and rotation of the attached node. Higher values will give a slower interpolation.
node Orientation ModeSearch playground for nodeOrientationMode
Orientation mode of the node attached to this behavior
palm Up StrictnessSearch playground for palmUpStrictness
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
target OffsetSearch playground for targetOffset
Offset distance from the hand in meters
target ZoneSearch playground for targetZone
Where to place the node regarding the center of the hand.
zone Orientation ModeSearch playground for zoneOrientationMode
Orientation mode of the 4 zones around the hand
Accessors
name
gets or sets behavior's name
Returns string
Methods
attachSearch playground for attach
Attaches the hand constraint to a
TransformNode
Parameters
node: TransformNode
defines the node to attach the behavior to
Returns void
detachSearch playground for detach
Detaches the behavior from the
TransformNode
Returns void
disableSearch playground for disable
Disable the behavior
Returns void
enableSearch playground for enable
Enable the behavior
Returns void
initSearch playground for init
Initializes the hand constraint behavior
Returns void
link ToXRExperienceSearch playground for linkToXRExperience
Links the behavior to the XR experience in which to retrieve hand transform information.
Parameters
xr: WebXRExperienceHelper
xr experience
Returns void
Hand constraint behavior that makes the attached
TransformNode
follow hands in XR experiences.5.0.0