Attention: Here be dragons
This is the
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
This object contains all data related to a pose on a tracked object.
XR runtimes often identify multiple locations on devices such as controllers that are spatially tracked.
Orientation, location, linear velocity and angular velocity are all provided for each pose by the XR runtime. This object contains this state of a pose.
get_adjusted_transform ( ) const
TrackingConfidence XR_TRACKING_CONFIDENCE_NONE =
No tracking information is available for this pose.
TrackingConfidence XR_TRACKING_CONFIDENCE_LOW =
Tracking information may be inaccurate or estimated. For example, with inside out tracking this would indicate a controller may be (partially) obscured.
TrackingConfidence XR_TRACKING_CONFIDENCE_HIGH =
Tracking information is deemed accurate and up to date.
Vector3 angular_velocity =
Vector3(0, 0, 0)
The angular velocity for this pose.
bool has_tracking_data =
true our tracking data is up to date. If
false we're no longer receiving new tracking data and our state is whatever that last valid state was.
Vector3 linear_velocity =
Vector3(0, 0, 0)
The linear velocity of this pose.
StringName name =
The name of this pose. Pose names are often driven by an action map setup by the user. Godot does suggest a number of pose names that it expects XRInterfaces to implement:
rootdefines a root location, often used for tracked objects that do not have further nodes.
aimdefines the tip of a controller with the orientation pointing outwards, for example: add your raycasts to this.
gripdefines the location where the user grips the controller
skeletondefines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime.
TrackingConfidence tracking_confidence =
void set_tracking_confidence ( TrackingConfidence value )
TrackingConfidence get_tracking_confidence ( )
The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is.
Transform3D transform =
Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
The transform containing the original and transform as reported by the XR runtime.
Transform3D get_adjusted_transform ( ) const