XRHandTracker
A tracked hand in XR.
XRHandTracker.swift:20class XRHandTracker
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.
Superclasses
class XRPositionalTracker
A tracked object.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
Type members
Instance members
var handTrackingSource: XRHandTracker.HandTrackingSource
The source of the hand tracking data.
var hasTrackingData: Bool
If
true
, the hand tracking data is valid.func getHandJointAngularVelocity(joint: XRHandTracker.HandJoint
) -> Vector3 Returns the angular velocity for the given hand joint.
func getHandJointFlags(joint: XRHandTracker.HandJoint
) -> XRHandTracker.HandJointFlags Returns flags about the validity of the tracking data for the given hand joint (see
XRHandTracker.HandJointFlags
).func getHandJointLinearVelocity(joint: XRHandTracker.HandJoint
) -> Vector3 Returns the linear velocity for the given hand joint.
func getHandJointRadius(joint: XRHandTracker.HandJoint
) -> Double Returns the radius of the given hand joint.
func getHandJointTransform(joint: XRHandTracker.HandJoint
) -> Transform3D Returns the transform for the given hand joint.
func setHandJointAngularVelocity(joint: XRHandTracker.HandJoint, angularVelocity: Vector3
) Sets the angular velocity for the given hand joint.
func setHandJointFlags(joint: XRHandTracker.HandJoint, flags: XRHandTracker.HandJointFlags
) Sets flags about the validity of the tracking data for the given hand joint.
func setHandJointLinearVelocity(joint: XRHandTracker.HandJoint, linearVelocity: Vector3
) Sets the linear velocity for the given hand joint.
func setHandJointRadius(joint: XRHandTracker.HandJoint, radius: Double
) Sets the radius of the given hand joint.
func setHandJointTransform(joint: XRHandTracker.HandJoint, transform: Transform3D
) Sets the transform for the given hand joint.