XRPose
Transform, velocities and flags for one tracked pose.
XRPose stores one named pose state. Name can be grip or aim; it is not a tracker name. A new pose has an Identity transform, zero velocities, an empty name, HasTrackingData=false and TrackingConfidence=None. Constructing it or editing fields does not connect a device.
Distinguish three spaces: Transform is raw provider data; GetAdjustedTransform scales position by WorldScale and applies the reference frame; world space additionally includes the gameplay XROrigin3D.GlobalTransform. GetAdjustedTransform includes no XRServer.WorldOrigin, changes no velocities and checks no tracking flag. Do not apply scale or origin twice.
This executed helper reads a world-transform copy. It creates no tracked Entity and does not assess tracking accuracy:
using Reckfell;
public static class PoseToWorld
{
// Borrowed pose/origin. Result is a value copy, not a tracked Entity.
public static bool TryRead(XRPose pose, XROrigin3D origin, out Transform3D world)
{
world = Transform3D.Identity;
if (pose is null || origin is null || !origin.IsInsideTree()
|| !pose.HasTrackingData) return false;
world = origin.GlobalTransform * pose.GetAdjustedTransform();
return true;
}
}A tracker’s GetPose returns shared state, not a snapshot. Do not dispose or mutate borrowed poses; copy values for storage. You own a separate instance created with new XRPose. High confidence and HasTrackingData are independent: setting one does not update the other. Coordinates remain accessible even when false.
Defaults, setters/getters, copies, position scaling, exclusion of gameplay origin from the adjusted transform and the helper were checked in the installed runtime. The test reference frame was Identity; composition order was reviewed in source, not through real recenter or headset use. Safe shared-pose reads: XRPositionalTracker.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
XRPoseConstructor
public XRPose();Creates a separate object: empty Name, Transform=Identity, zero velocities, HasTrackingData=false and TrackingConfidence=None. Creates no tracker entry and starts no tracking. You own an instance you create; borrowed tracker poses have a different lifetime.
Properties6
AngularVelocityProperty
public Vector3 AngularVelocity { get; set; }Stored angular velocity, initially Vector3.Zero. Written separately from Transform, not derived from rotation. GetAdjustedTransform does not convert the velocity to gameplay space; do not assume it is automatically a world-space velocity.
HasTrackingDataProperty
public bool HasTrackingData { get; set; }Tracking-availability flag, initially false. The setter changes only the flag: it clears no transform, velocities or confidence and checks no device. Do not edit provider-owned pose state from gameplay. Check this flag before using retained coordinates.
LinearVelocityProperty
public Vector3 LinearVelocity { get; set; }Stored linear velocity, initially Vector3.Zero. The setter does not derive it from transforms or apply WorldScale/reference frame. GetAdjustedTransform does not convert this field either. The tracking provider defines its space and unit conventions.
NameProperty
public StringName Name { get; set; }Pose name, initially empty; for example grip or aim in tracker data. Not a tracker name or button action. The setter changes only the field: renaming the object does not rekey its XRPositionalTracker entry. Do not rename provider-owned poses.
TrackingConfidenceProperty
public XRPose.TrackingConfidenceEnum TrackingConfidence { get; set; }Provider confidence estimate, initially None. None, Low and High describe reported quality, but the setter checks no device and does not change HasTrackingData. High confidence is not a substitute for checking pose freshness.
TransformProperty
public Transform3D Transform { get; set; }Raw pose transform in provider tracking space, initially Identity. The setter stores it without WorldScale, reference frame or gameplay origin. The getter returns a Transform3D value: editing the copy does not change the pose. A transform alone does not establish current tracking.
Methods13
GetAdjustedTransformTransform3D
public Transform3D GetAdjustedTransform();Returns a Transform copy: first multiplies only its position by XRServer.WorldScale, then left-multiplies by XRServer.GetReferenceFrame(). Includes neither XRServer.WorldOrigin nor the gameplay XROrigin3D.GlobalTransform. Changes no raw pose or velocities and checks no HasTrackingData. For world space apply origin.GlobalTransform to the result once.
Transform3DCopy after position scale and reference frame, excluding gameplay origin and tracking validation.
GetAngularVelocityVector3
public Vector3 GetAngularVelocity();Returns the stored angular-velocity Vector3, initially zero. Derives no velocity from Transform and applies no reference frame.
Vector3Stored angular-velocity Vector3 without conversion.
GetHasTrackingDatabool
public bool GetHasTrackingData();Returns the stored bool, initially false. Does not request a device update or inspect confidence.
boolStored flag; initially false.
GetLinearVelocityVector3
public Vector3 GetLinearVelocity();Returns the stored linear-velocity Vector3 without gameplay-space conversion. Initially zero; does not check tracking validity.
Vector3Stored linear-velocity Vector3 without conversion.
GetNameStringName
public StringName GetName();Returns the stored pose name, initially empty. Not the left_hand/right_hand tracker name.
StringNamePose name, initially empty.
GetTrackingConfidenceXRPose.TrackingConfidenceEnum
public XRPose.TrackingConfidenceEnum GetTrackingConfidence();Returns the stored estimate, initially None. Does not replace HasTrackingData or measure quality independently.
XRPose.TrackingConfidenceEnumStored confidence estimate, initially None.
GetTransformTransform3D
public Transform3D GetTransform();Returns a raw Transform copy in tracking space, without scale or gameplay origin. Retained coordinates remain accessible when HasTrackingData=false.
Transform3DRaw Transform3D value; not an Entity world transform.
SetAngularVelocityvoid
public void SetAngularVelocity(Vector3 velocity);Stored angular velocity, initially Vector3.Zero. Written separately from Transform, not derived from rotation. GetAdjustedTransform does not convert the velocity to gameplay space; do not assume it is automatically a world-space velocity.
| Name | Type | Default |
|---|---|---|
velocity | Vector3 | — |
velocityAngular-velocity Vector3 in provider conventions, without automatic conversion.
SetHasTrackingDatavoid
public void SetHasTrackingData(bool hasTrackingData);Tracking-availability flag, initially false. The setter changes only the flag: it clears no transform, velocities or confidence and checks no device. Do not edit provider-owned pose state from gameplay. Check this flag before using retained coordinates.
| Name | Type | Default |
|---|---|---|
hasTrackingData | bool | — |
hasTrackingDataNew data-availability flag; clears no other fields and checks no device.
SetLinearVelocityvoid
public void SetLinearVelocity(Vector3 velocity);Stored linear velocity, initially Vector3.Zero. The setter does not derive it from transforms or apply WorldScale/reference frame. GetAdjustedTransform does not convert this field either. The tracking provider defines its space and unit conventions.
| Name | Type | Default |
|---|---|---|
velocity | Vector3 | — |
velocityLinear-velocity Vector3 in provider conventions, without automatic conversion.
SetNamevoid
public void SetName(StringName name);Pose name, initially empty; for example grip or aim in tracker data. Not a tracker name or button action. The setter changes only the field: renaming the object does not rekey its XRPositionalTracker entry. Do not rename provider-owned poses.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
namePose name in provider data; changing it does not rekey a tracker entry.
SetTrackingConfidencevoid
public void SetTrackingConfidence(XRPose.TrackingConfidenceEnum trackingConfidence);Provider confidence estimate, initially None. None, Low and High describe reported quality, but the setter checks no device and does not change HasTrackingData. High confidence is not a substitute for checking pose freshness.
| Name | Type | Default |
|---|---|---|
trackingConfidence | XRPose.TrackingConfidenceEnum | — |
trackingConfidenceNone, Low or High; changing the estimate does not enable tracking.
SetTransformvoid
public void SetTransform(Transform3D transform);Raw pose transform in provider tracking space, initially Identity. The setter stores it without WorldScale, reference frame or gameplay origin. The getter returns a Transform3D value: editing the copy does not change the pose. A transform alone does not establish current tracking.
| Name | Type | Default |
|---|---|---|
transform | Transform3D | — |
transformRaw tracking-space transform; add gameplay origin separately.
XRPose.TrackingConfidenceEnum
| Value | Description |
|---|---|
High = 2 | Tracking information is considered accurate and up to date. |
Low = 1 | Tracking information may be inaccurate or estimated. For example, with inside out tracking this would indicate a controller may be (partially) obscured. |
None = 0 | No tracking information is available for this pose. |