Table of Contents

Class XRHandTracker

Namespace
Godot
Assembly
GodotSharp.dll

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 Godot Humanoid hand skeleton and store this data on the XRHandTracker object.

Use XRHandModifier3D to animate a hand mesh using hand tracking data.

public class XRHandTracker : XRPositionalTracker, IDisposable
Inheritance
XRHandTracker
Implements
Inherited Members

Constructors

XRHandTracker()

public XRHandTracker()

Properties

HandTrackingSource

The source of the hand tracking data.

public XRHandTracker.HandTrackingSourceEnum HandTrackingSource { get; set; }

Property Value

XRHandTracker.HandTrackingSourceEnum

HasTrackingData

If true, the hand tracking data is valid.

public bool HasTrackingData { get; set; }

Property Value

bool

Methods

GetHandJointAngularVelocity(HandJoint)

Returns the angular velocity for the given hand joint.

public Vector3 GetHandJointAngularVelocity(XRHandTracker.HandJoint joint)

Parameters

joint XRHandTracker.HandJoint

Returns

Vector3

GetHandJointFlags(HandJoint)

Returns flags about the validity of the tracking data for the given hand joint (see XRHandTracker.HandJointFlags).

public XRHandTracker.HandJointFlags GetHandJointFlags(XRHandTracker.HandJoint joint)

Parameters

joint XRHandTracker.HandJoint

Returns

XRHandTracker.HandJointFlags

GetHandJointLinearVelocity(HandJoint)

Returns the linear velocity for the given hand joint.

public Vector3 GetHandJointLinearVelocity(XRHandTracker.HandJoint joint)

Parameters

joint XRHandTracker.HandJoint

Returns

Vector3

GetHandJointRadius(HandJoint)

Returns the radius of the given hand joint.

public float GetHandJointRadius(XRHandTracker.HandJoint joint)

Parameters

joint XRHandTracker.HandJoint

Returns

float

GetHandJointTransform(HandJoint)

Returns the transform for the given hand joint.

public Transform3D GetHandJointTransform(XRHandTracker.HandJoint joint)

Parameters

joint XRHandTracker.HandJoint

Returns

Transform3D

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

SetHandJointAngularVelocity(HandJoint, Vector3)

Sets the angular velocity for the given hand joint.

public void SetHandJointAngularVelocity(XRHandTracker.HandJoint joint, Vector3 angularVelocity)

Parameters

joint XRHandTracker.HandJoint
angularVelocity Vector3

SetHandJointFlags(HandJoint, HandJointFlags)

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

public void SetHandJointFlags(XRHandTracker.HandJoint joint, XRHandTracker.HandJointFlags flags)

Parameters

joint XRHandTracker.HandJoint
flags XRHandTracker.HandJointFlags

SetHandJointLinearVelocity(HandJoint, Vector3)

Sets the linear velocity for the given hand joint.

public void SetHandJointLinearVelocity(XRHandTracker.HandJoint joint, Vector3 linearVelocity)

Parameters

joint XRHandTracker.HandJoint
linearVelocity Vector3

SetHandJointRadius(HandJoint, float)

Sets the radius of the given hand joint.

public void SetHandJointRadius(XRHandTracker.HandJoint joint, float radius)

Parameters

joint XRHandTracker.HandJoint
radius float

SetHandJointTransform(HandJoint, Transform3D)

Sets the transform for the given hand joint.

public void SetHandJointTransform(XRHandTracker.HandJoint joint, Transform3D transform)

Parameters

joint XRHandTracker.HandJoint
transform Transform3D