Class XRPose
- Namespace
- Godot
- Assembly
- GodotSharp.dll
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.
public class XRPose : RefCounted, IDisposable
- Inheritance
-
XRPose
- Implements
- Inherited Members
Constructors
XRPose()
public XRPose()
Properties
AngularVelocity
The angular velocity for this pose.
public Vector3 AngularVelocity { get; set; }
Property Value
HasTrackingData
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.
public bool HasTrackingData { get; set; }
Property Value
LinearVelocity
The linear velocity of this pose.
public Vector3 LinearVelocity { get; set; }
Property Value
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:
- root
defines a root location, often used for tracked objects that do not have further nodes.
- aim
defines the tip of a controller with the orientation pointing outwards, for example: add your raycasts to this.
- grip
defines the location where the user grips the controller
- skeleton
defines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime.
public StringName Name { get; set; }
Property Value
TrackingConfidence
The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is.
public XRPose.TrackingConfidenceEnum TrackingConfidence { get; set; }
Property Value
Transform
The transform containing the original and transform as reported by the XR runtime.
public Transform3D Transform { get; set; }
Property Value
Methods
GetAdjustedTransform()
Returns the Transform with world scale and our reference frame applied. This is the transform used to position XRNode3D objects.
public Transform3D GetAdjustedTransform()
Returns
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_nameName of the method to check for.
Returns
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_nameName of the signal to check for.
Returns
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_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.