XRBodyTracker
Body joints, capabilities and separate data validity.
XRBodyTracker stores provider skeleton data; it does not solve IK from separate trackers. An object does not establish hardware tracking. A new instance has Type=Body, Hand=Unknown, HasTrackingData=false and BodyFlags=0.
Confirmed defect: initial JointFlags are uninitialized. A custom provider must populate required flags/transforms before enabling data; gameplay must not bypass validation by manually setting true. This SDK has 87 joints; Joint.Max is the bound.
Check HasTrackingData and each required joint’s validity. BodyFlags describes supported regions and does not replace JointFlags. GetJointTransform returns a provider-space value copy; local bones need separate Root/parent-joint processing. Data loss retains old values.
Synthetic data and the complete Root-relative reader were checked, not a real provider or full avatar. Example, role trackers and diagnosis: body tracking.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
XRBodyTrackerConstructor
public XRBodyTracker();Creates a body container: Type=Body, Hand=Unknown, HasTrackingData=false, BodyFlags=0. Defect: initial JointFlags are uninitialized. A custom provider must populate them before enabling data. Detects no body and automatically registers no device.
Properties2
BodyFlagsProperty
public XRBodyTracker.BodyFlagsEnum BodyFlags { get; set; }Bitmask of supported regions: UpperBodySupported, LowerBodySupported, HandsSupported; initially 0. Capability metadata, not joint-validity flags. The setter computes neither HasTrackingData nor joint availability.
HasTrackingDataProperty
public bool HasTrackingData { get; set; }Body-data flag, initially false. The setter populates no joints, changes no BodyFlags and creates no positional default pose. Joint values remain when false but are not current. Gameplay reads provider state rather than enabling an empty container.
Methods8
GetBodyFlagsXRBodyTracker.BodyFlagsEnum
public XRBodyTracker.BodyFlagsEnum GetBodyFlags();Reads the stored capability mask. Nonzero does not establish current joint data.
XRBodyTracker.BodyFlagsEnumCapability mask, initially 0.
GetHasTrackingDatabool
public bool GetHasTrackingData();Returns the whole-body flag; also check each required joint and its parent.
boolStored whole-body bool.
GetJointFlagsXRBodyTracker.JointFlags
public XRBodyTracker.JointFlags GetJointFlags(XRBodyTracker.Joint joint);Reads Position/Orientation VALID and TRACKED bits. Values are not guaranteed before provider initialization because of the constructor defect. TRACKED does not replace VALID; choose a policy for estimated poses.
| Name | Type | Default |
|---|---|---|
joint | XRBodyTracker.Joint | — |
jointXRBodyTracker.Joint value; Max is the bound, not a valid joint. Check bounds before calling.
XRBodyTracker.JointFlagsJoint mask; not guaranteed before initialization.
GetJointTransformTransform3D
public Transform3D GetJointTransform(XRBodyTracker.Joint joint);Returns a provider-space joint-transform copy without checking flags. Do not assume world or bone-parent-local space. Mapping requires consistent Root and parent transforms.
| Name | Type | Default |
|---|---|---|
joint | XRBodyTracker.Joint | — |
jointXRBodyTracker.Joint value; Max is the bound, not a valid joint. Check bounds before calling.
Transform3DTransform3D value in provider space.
SetBodyFlagsvoid
public void SetBodyFlags(XRBodyTracker.BodyFlagsEnum flags);Bitmask of supported regions: UpperBodySupported, LowerBodySupported, HandsSupported; initially 0. Capability metadata, not joint-validity flags. The setter computes neither HasTrackingData nor joint availability.
| Name | Type | Default |
|---|---|---|
flags | XRBodyTracker.BodyFlagsEnum | — |
flagsSupported-body-region mask, not joint validity.
SetHasTrackingDatavoid
public void SetHasTrackingData(bool hasData);Body-data flag, initially false. The setter populates no joints, changes no BodyFlags and creates no positional default pose. Joint values remain when false but are not current. Gameplay reads provider state rather than enabling an empty container.
| Name | Type | Default |
|---|---|---|
hasData | bool | — |
hasDataWhole-body data flag; does not validate all joints.
SetJointFlagsvoid
public void SetJointFlags(XRBodyTracker.Joint joint, XRBodyTracker.JointFlags flags);Stores one joint mask without changing transform, BodyFlags or HasTrackingData. Provider API, not a hardware-tracking enable command.
| Name | Type | Default |
|---|---|---|
joint | XRBodyTracker.Joint | — |
flags | XRBodyTracker.JointFlags | — |
jointXRBodyTracker.Joint value; Max is the bound, not a valid joint. Check bounds before calling.
flagsSelected-joint validity/tracking mask, not BodyFlags.
SetJointTransformvoid
public void SetJointTransform(XRBodyTracker.Joint joint, Transform3D transform);Stores a transform without recomputing flags or other joints. Performs no IK, creates no default pose and moves no avatar model.
| Name | Type | Default |
|---|---|---|
joint | XRBodyTracker.Joint | — |
transform | Transform3D | — |
jointXRBodyTracker.Joint value; Max is the bound, not a valid joint. Check bounds before calling.
transformTransform in the provider’s consistent space. Not a bone-local pose unless explicitly defined that way.
XRBodyTracker.BodyFlagsEnum
| Value | Description |
|---|---|
HandsSupported = 4 | Hand tracking supported. |
LowerBodySupported = 2 | Lower body tracking supported. |
UpperBodySupported = 1 | Upper body tracking supported. |
XRBodyTracker.Joint
| Value | Description |
|---|---|
Chest = 3 | Chest joint. |
Head = 6 | Head joint. |
HeadTip = 7 | Head tip joint. |
Hips = 1 | Hips joint. |
LeftFoot = 16 | Left foot joint. |
LeftFootTwist = 81 | Left foot twist joint. |
LeftHand = 22 | Left hand joint. |
LeftHeel = 82 | Left heel joint. |
LeftIndexFingerMetacarpal = 29 | Left index finger metacarpal joint. |
LeftIndexFingerPhalanxDistal = 32 | Left index finger phalanx distal joint. |
LeftIndexFingerPhalanxIntermediate = 31 | Left index finger phalanx intermediate joint. |
LeftIndexFingerPhalanxProximal = 30 | Left index finger phalanx proximal joint. |
LeftIndexFingerTip = 33 | Left index finger tip joint. |
LeftLowerArm = 10 | Left lower arm joint. |
LeftLowerLeg = 15 | Left lower leg joint. |
LeftMiddleFingerMetacarpal = 34 | Left middle finger metacarpal joint. |
LeftMiddleFingerPhalanxDistal = 37 | Left middle finger phalanx distal joint. |
LeftMiddleFingerPhalanxIntermediate = 36 | Left middle finger phalanx intermediate joint. |
LeftMiddleFingerPhalanxProximal = 35 | Left middle finger phalanx proximal joint. |
LeftMiddleFingerTip = 38 | Left middle finger tip joint. |
LeftMiddleFoot = 83 | Left middle foot joint. |
LeftPalm = 23 | Left palm joint. |
LeftPinkyFingerMetacarpal = 44 | Left pinky finger metacarpal joint. |
LeftPinkyFingerPhalanxDistal = 47 | Left pinky finger phalanx distal joint. |
LeftPinkyFingerPhalanxIntermediate = 46 | Left pinky finger phalanx intermediate joint. |
LeftPinkyFingerPhalanxProximal = 45 | Left pinky finger phalanx proximal joint. |
LeftPinkyFingerTip = 48 | Left pinky finger tip joint. |
LeftRingFingerMetacarpal = 39 | Left ring finger metacarpal joint. |
LeftRingFingerPhalanxDistal = 42 | Left ring finger phalanx distal joint. |
LeftRingFingerPhalanxIntermediate = 41 | Left ring finger phalanx intermediate joint. |
LeftRingFingerPhalanxProximal = 40 | Left ring finger phalanx proximal joint. |
LeftRingFingerTip = 43 | Left ring finger tip joint. |
LeftScapula = 77 | Left scapula joint. |
LeftShoulder = 8 | Left shoulder joint. |
LeftThumbMetacarpal = 25 | Left thumb metacarpal joint. |
LeftThumbPhalanxDistal = 27 | Left thumb phalanx distal joint. |
LeftThumbPhalanxProximal = 26 | Left thumb phalanx proximal joint. |
LeftThumbTip = 28 | Left thumb tip joint. |
LeftToes = 17 | Left toes joint. |
LeftUpperArm = 9 | Left upper arm joint. |
LeftUpperLeg = 14 | Left upper leg joint. |
LeftWrist = 24 | Left wrist joint. |
LeftWristTwist = 78 | Left wrist twist joint. |
LowerChest = 76 | Lower chest joint. |
Max = 87 | Represents the size of the |
Neck = 5 | Neck joint. |
RightFoot = 20 | Right foot joint. |
RightFootTwist = 84 | Right foot twist joint. |
RightHand = 49 | Right hand joint. |
RightHeel = 85 | Right heel joint. |
RightIndexFingerMetacarpal = 56 | Right index finger metacarpal joint. |
RightIndexFingerPhalanxDistal = 59 | Right index finger phalanx distal joint. |
RightIndexFingerPhalanxIntermediate = 58 | Right index finger phalanx intermediate joint. |
RightIndexFingerPhalanxProximal = 57 | Right index finger phalanx proximal joint. |
RightIndexFingerTip = 60 | Right index finger tip joint. |
RightLowerArm = 13 | Right lower arm joint. |
RightLowerLeg = 19 | Right lower leg joint. |
RightMiddleFingerMetacarpal = 61 | Right middle finger metacarpal joint. |
RightMiddleFingerPhalanxDistal = 64 | Right middle finger phalanx distal joint. |
RightMiddleFingerPhalanxIntermediate = 63 | Right middle finger phalanx intermediate joint. |
RightMiddleFingerPhalanxProximal = 62 | Right middle finger phalanx proximal joint. |
RightMiddleFingerTip = 65 | Right middle finger tip joint. |
RightMiddleFoot = 86 | Right middle foot joint. |
RightPalm = 50 | Right palm joint. |
RightPinkyFingerMetacarpal = 71 | Right pinky finger metacarpal joint. |
RightPinkyFingerPhalanxDistal = 74 | Right pinky finger phalanx distal joint. |
RightPinkyFingerPhalanxIntermediate = 73 | Right pinky finger phalanx intermediate joint. |
RightPinkyFingerPhalanxProximal = 72 | Right pinky finger phalanx proximal joint. |
RightPinkyFingerTip = 75 | Right pinky finger tip joint. |
RightRingFingerMetacarpal = 66 | Right ring finger metacarpal joint. |
RightRingFingerPhalanxDistal = 69 | Right ring finger phalanx distal joint. |
RightRingFingerPhalanxIntermediate = 68 | Right ring finger phalanx intermediate joint. |
RightRingFingerPhalanxProximal = 67 | Right ring finger phalanx proximal joint. |
RightRingFingerTip = 70 | Right ring finger tip joint. |
RightScapula = 79 | Right scapula joint. |
RightShoulder = 11 | Right shoulder joint. |
RightThumbMetacarpal = 52 | Right thumb metacarpal joint. |
RightThumbPhalanxDistal = 54 | Right thumb phalanx distal joint. |
RightThumbPhalanxProximal = 53 | Right thumb phalanx proximal joint. |
RightThumbTip = 55 | Right thumb tip joint. |
RightToes = 21 | Right toes joint. |
RightUpperArm = 12 | Right upper arm joint. |
RightUpperLeg = 18 | Right upper leg joint. |
RightWrist = 51 | Right wrist joint. |
RightWristTwist = 80 | Right wrist twist joint. |
Root = 0 | Root joint. |
Spine = 2 | Spine joint. |
UpperChest = 4 | Upper chest joint. |
XRBodyTracker.JointFlags
| Value | Description |
|---|---|
OrientationTracked = 2 | The joint's orientation is actively tracked. May not be set if tracking has been temporarily lost. |
OrientationValid = 1 | The joint's orientation data is valid. |
PositionTracked = 8 | The joint's position is actively tracked. May not be set if tracking has been temporarily lost. |
PositionValid = 4 | The joint's position data is valid. |