Class reference

XRHandTracker

Inherits XRPositionalTracker

A tracked hand in XR.

Description

A hand tracking system will create an instance of this object and add it to the XRServer. This tracking system will then obtain skeleton data, convert it to the Redot Humanoid hand skeleton and store this data on the XRHandTracker object. Use XRHandModifier3D to animate a hand mesh using hand tracking data.

Properties

int hand_tracking_source = 0

The source of the hand tracking data.

bool has_tracking_data = false

If true, the hand tracking data is valid.

Methods

Vector3 get_hand_joint_angular_velocity(int joint) const

Returns the angular velocity for the given hand joint.

int get_hand_joint_flags(int joint) const

Returns flags about the validity of the tracking data for the given hand joint.

Vector3 get_hand_joint_linear_velocity(int joint) const

Returns the linear velocity for the given hand joint.

float get_hand_joint_radius(int joint) const

Returns the radius of the given hand joint.

Transform3D get_hand_joint_transform(int joint) const

Returns the transform for the given hand joint.

void set_hand_joint_angular_velocity(int joint, Vector3 angular_velocity)

Sets the angular velocity for the given hand joint.

void set_hand_joint_flags(int joint, int flags)

Sets flags about the validity of the tracking data for the given hand joint.

void set_hand_joint_linear_velocity(int joint, Vector3 linear_velocity)

Sets the linear velocity for the given hand joint.

void set_hand_joint_radius(int joint, float radius)

Sets the radius of the given hand joint.

void set_hand_joint_transform(int joint, Transform3D transform)

Sets the transform for the given hand joint.

Constants

HAND_TRACKING_SOURCE_UNKNOWN = 0

Enum: HandTrackingSource

The source of hand tracking data is unknown.

HAND_TRACKING_SOURCE_UNOBSTRUCTED = 1

Enum: HandTrackingSource

The source of hand tracking data is unobstructed, meaning that an accurate method of hand tracking is used. These include optical hand tracking, data gloves, etc.

HAND_TRACKING_SOURCE_CONTROLLER = 2

Enum: HandTrackingSource

The source of hand tracking data is a controller, meaning that joint positions are inferred from controller inputs.

HAND_TRACKING_SOURCE_NOT_TRACKED = 3

Enum: HandTrackingSource

No hand tracking data is tracked, this either means the hand is obscured, the controller is turned off, or tracking is not supported for the current input type.

HAND_TRACKING_SOURCE_MAX = 4

Enum: HandTrackingSource

Represents the size of the HandTrackingSource enum.

HAND_JOINT_PALM = 0

Enum: HandJoint

Palm joint.

HAND_JOINT_WRIST = 1

Enum: HandJoint

Wrist joint.

HAND_JOINT_THUMB_METACARPAL = 2

Enum: HandJoint

Thumb metacarpal joint.

HAND_JOINT_THUMB_PHALANX_PROXIMAL = 3

Enum: HandJoint

Thumb phalanx proximal joint.

HAND_JOINT_THUMB_PHALANX_DISTAL = 4

Enum: HandJoint

Thumb phalanx distal joint.

HAND_JOINT_THUMB_TIP = 5

Enum: HandJoint

Thumb tip joint.

HAND_JOINT_INDEX_FINGER_METACARPAL = 6

Enum: HandJoint

Index finger metacarpal joint.

HAND_JOINT_INDEX_FINGER_PHALANX_PROXIMAL = 7

Enum: HandJoint

Index finger phalanx proximal joint.

HAND_JOINT_INDEX_FINGER_PHALANX_INTERMEDIATE = 8

Enum: HandJoint

Index finger phalanx intermediate joint.

HAND_JOINT_INDEX_FINGER_PHALANX_DISTAL = 9

Enum: HandJoint

Index finger phalanx distal joint.

HAND_JOINT_INDEX_FINGER_TIP = 10

Enum: HandJoint

Index finger tip joint.

HAND_JOINT_MIDDLE_FINGER_METACARPAL = 11

Enum: HandJoint

Middle finger metacarpal joint.

HAND_JOINT_MIDDLE_FINGER_PHALANX_PROXIMAL = 12

Enum: HandJoint

Middle finger phalanx proximal joint.

HAND_JOINT_MIDDLE_FINGER_PHALANX_INTERMEDIATE = 13

Enum: HandJoint

Middle finger phalanx intermediate joint.

HAND_JOINT_MIDDLE_FINGER_PHALANX_DISTAL = 14

Enum: HandJoint

Middle finger phalanx distal joint.

HAND_JOINT_MIDDLE_FINGER_TIP = 15

Enum: HandJoint

Middle finger tip joint.

HAND_JOINT_RING_FINGER_METACARPAL = 16

Enum: HandJoint

Ring finger metacarpal joint.

HAND_JOINT_RING_FINGER_PHALANX_PROXIMAL = 17

Enum: HandJoint

Ring finger phalanx proximal joint.

HAND_JOINT_RING_FINGER_PHALANX_INTERMEDIATE = 18

Enum: HandJoint

Ring finger phalanx intermediate joint.

HAND_JOINT_RING_FINGER_PHALANX_DISTAL = 19

Enum: HandJoint

Ring finger phalanx distal joint.

HAND_JOINT_RING_FINGER_TIP = 20

Enum: HandJoint

Ring finger tip joint.

HAND_JOINT_PINKY_FINGER_METACARPAL = 21

Enum: HandJoint

Pinky finger metacarpal joint.

HAND_JOINT_PINKY_FINGER_PHALANX_PROXIMAL = 22

Enum: HandJoint

Pinky finger phalanx proximal joint.

HAND_JOINT_PINKY_FINGER_PHALANX_INTERMEDIATE = 23

Enum: HandJoint

Pinky finger phalanx intermediate joint.

HAND_JOINT_PINKY_FINGER_PHALANX_DISTAL = 24

Enum: HandJoint

Pinky finger phalanx distal joint.

HAND_JOINT_PINKY_FINGER_TIP = 25

Enum: HandJoint

Pinky finger tip joint.

HAND_JOINT_MAX = 26

Enum: HandJoint

Represents the size of the HandJoint enum.

HAND_JOINT_FLAG_ORIENTATION_VALID = 1

Enum: HandJointFlags

The hand joint's orientation data is valid.

HAND_JOINT_FLAG_ORIENTATION_TRACKED = 2

Enum: HandJointFlags

The hand joint's orientation is actively tracked. May not be set if tracking has been temporarily lost.

HAND_JOINT_FLAG_POSITION_VALID = 4

Enum: HandJointFlags

The hand joint's position data is valid.

HAND_JOINT_FLAG_POSITION_TRACKED = 8

Enum: HandJointFlags

The hand joint's position is actively tracked. May not be set if tracking has been temporarily lost.

HAND_JOINT_FLAG_LINEAR_VELOCITY_VALID = 16

Enum: HandJointFlags

The hand joint's linear velocity data is valid.

HAND_JOINT_FLAG_ANGULAR_VELOCITY_VALID = 32

Enum: HandJointFlags

The hand joint's angular velocity data is valid.

Tutorials

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.