Table of Contents

Class XRPose

This object contains all data related to a pose on a tracked object.

Inheritance
XRPose

Remarks

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.

See Also

Properties

angular_velocity

The angular velocity for this pose.

var angular_velocity : Vector3 = Vector3(0, 0, 0)

Property Value

Vector3

Remarks

  • void set_angular_velocity(Vector3 value)
  • Vector3 get_angular_velocity

has_tracking_data

If 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.

var has_tracking_data : bool = false

Property Value

bool

Remarks

  • void set_has_tracking_data(bool value)
  • bool get_has_tracking_data

linear_velocity

The linear velocity of this pose.

var linear_velocity : Vector3 = Vector3(0, 0, 0)

Property Value

Vector3

Remarks

name

The name of this pose. Usually, this name is derived from an action map set up by the user. Godot also suggests some pose names that XRInterface objects are expected to implement:

  • root is the root location, often used for tracked objects that do not have further nodes.

  • aim is the tip of a controller with its orientation pointing outwards, often used for raycasts.

  • grip is the location where the user grips the controller.

  • skeleton is the root location for a hand mesh, when using hand tracking and an animated skeleton is supplied by the XR runtime.

var name : StringName = &""

Property Value

StringName

Remarks

tracking_confidence

The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is.

var tracking_confidence : int = 0

Property Value

int

Remarks

  • void set_tracking_confidence(int value)
  • int get_tracking_confidence

transform

The transform containing the original and transform as reported by the XR runtime.

var transform : Transform3D = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

Property Value

Transform3D

Remarks

Methods

get_adjusted_transform

Qualifiers: const

Returns the transform with world scale and our reference frame applied. This is the transform used to position XRNode3D objects.

Transform3D get_adjusted_transform