XRBodyModifier3D
Apply body data to matched skeleton bones.
XRBodyModifier3D runs under Skeleton3D with XRBodyTracker data. Defaults are BodyTracker=/user/body_tracker, UpperBody/LowerBody/Hands enabled in BodyUpdate, and BoneUpdate=Full. A modifier connects no device and reconstructs no skeleton from a few trackers.
Bone names and hierarchy must match the data. Full applies relative positions and rotations; RotationOnly leaves most base positions but still updates Hips. MotionScale multiplies positions before relative conversion. BodyUpdate=0 does not disable every extra joint; Active=false disables processing completely.
Changing BodyTracker selects another source at the next processing step without remapping if Skeleton and BodyUpdate are unchanged. A missing tracker, HasTrackingData=false or invalid Root skips the update; the hand-style cached pose is not replayed here.
Skeleton3D applies modifiers temporarily and restores base pose. Read output inside ModificationProcessed. This executed example saves a diagnostic copy; LastModified can be stale when processing does not run:
using Reckfell;
public partial class BonePoseProbe : Entity
{
[Export] public Skeleton3D Skeleton { get; set; } = null!;
[Export] public SkeletonModifier3D Modifier { get; set; } = null!;
[Export] public int Bone { get; set; }
public Transform3D LastModified { get; private set; } = Transform3D.Identity;
public override void _Ready()
{
if (Skeleton is null || Modifier is null || Modifier.GetSkeleton() != Skeleton
|| Bone < 0 || Bone >= Skeleton.GetBoneCount())
{
ReckfellApi.PushError("BonePoseProbe: assign a matching skeleton, modifier and bone index.");
return;
}
Modifier.ModificationProcessed += Capture;
}
private void Capture() => LastModified = Skeleton.GetBonePose(Bone);
public override void _ExitTree()
{
if (Modifier is not null && ReckfellObject.IsInstanceValid(Modifier))
Modifier.ModificationProcessed -= Capture;
}
}Fourteen scenarios used a real Skeleton3D with synthetic data for all 87 joints. The diagnostic hierarchy has Spine under Hips and other nonroot bones under Root; it does not assess a real Humanoid rig. Partial-invalid-parent correctness, skin weights, deformation, animation blending, devices and rendered images were not tested. Consistent valid parent joints are required.
Reader and provider requirements: body tracking.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
XRBodyModifier3DConstructor
public XRBodyModifier3D();Creates a modifier with BodyTracker=/user/body_tracker, all BodyUpdate regions and BoneUpdate=Full. Processing needs a Skeleton3D parent, matching bone names and an XRBodyTracker provider. Construction alone enables no tracking.
Properties3
BodyTrackerProperty
public StringName BodyTracker { get; set; }XRBodyTracker name, initially /user/body_tracker. The setter only stores the string: connects no provider and does not rebuild bone mapping. Changing the name selects another source for subsequent processing; bone mapping depends on Skeleton and BodyUpdate, not the tracker name.
BodyUpdateProperty
public XRBodyModifier3D.BodyUpdateEnum BodyUpdate { get; set; }Mapping-region mask: UpperBody, LowerBody, Hands; all three by default. The setter rebuilds mapping when inside the tree. Filters primary-joint ranges; does not universally exclude Root and extra joints. Use inherited Active=false for complete disabling.
BoneUpdateProperty
public XRBodyModifier3D.BoneUpdateEnum BoneUpdate { get; set; }Bone mode, initially Full. Full updates positions and rotations; RotationOnly updates rotations but still applies Hips position. Enum bounds are checked. Creates no skin weights and solves no calibration, scale or avatar placement.
Methods6
GetBodyTrackerStringName
public StringName GetBodyTracker();Configured tracker name, not proof of its presence or data.
StringNameProvider name, initially /user/body_tracker.
GetBodyUpdateXRBodyModifier3D.BodyUpdateEnum
public XRBodyModifier3D.BodyUpdateEnum GetBodyUpdate();Configured mapping-filter mask, not real-body capabilities.
XRBodyModifier3D.BodyUpdateEnumConfigured modifier-region mask.
GetBoneUpdateXRBodyModifier3D.BoneUpdateEnum
public XRBodyModifier3D.BoneUpdateEnum GetBoneUpdate();Configured Full/RotationOnly mode; RotationOnly retains the Hips-position exception.
XRBodyModifier3D.BoneUpdateEnumConfigured bone mode, initially Full.
SetBodyTrackervoid
public void SetBodyTracker(StringName trackerName);XRBodyTracker name, initially /user/body_tracker. The setter only stores the string: connects no provider and does not rebuild bone mapping. Changing the name selects another source for subsequent processing; bone mapping depends on Skeleton and BodyUpdate, not the tracker name.
| Name | Type | Default |
|---|---|---|
trackerName | StringName | — |
trackerNameExact registered XRBodyTracker name. Changing it needs no remapping when Skeleton and BodyUpdate are unchanged.
SetBodyUpdatevoid
public void SetBodyUpdate(XRBodyModifier3D.BodyUpdateEnum bodyUpdate);Mapping-region mask: UpperBody, LowerBody, Hands; all three by default. The setter rebuilds mapping when inside the tree. Filters primary-joint ranges; does not universally exclude Root and extra joints. Use inherited Active=false for complete disabling.
| Name | Type | Default |
|---|---|---|
bodyUpdate | XRBodyModifier3D.BodyUpdateEnum | — |
bodyUpdateUpperBody/LowerBody/Hands mask; 0 is not a universal processing-disable command.
SetBoneUpdatevoid
public void SetBoneUpdate(XRBodyModifier3D.BoneUpdateEnum boneUpdate);Bone mode, initially Full. Full updates positions and rotations; RotationOnly updates rotations but still applies Hips position. Enum bounds are checked. Creates no skin weights and solves no calibration, scale or avatar placement.
| Name | Type | Default |
|---|---|---|
boneUpdate | XRBodyModifier3D.BoneUpdateEnum | — |
boneUpdateFull or RotationOnly; Max is the enum bound. Hips position updates in both modes.
XRBodyModifier3D.BodyUpdateEnum
| Value | Description |
|---|---|
Hands = 4 | The skeleton's hand joints are updated. |
LowerBody = 2 | The skeleton's lower body joints are updated. |
UpperBody = 1 | The skeleton's upper body joints are updated. |
XRBodyModifier3D.BoneUpdateEnum
| Value | Description |
|---|---|
Full = 0 | The skeleton's bones are fully updated (both position and rotation) to match the tracked bones. |
Max = 2 | Represents the size of the |
RotationOnly = 1 | The skeleton's bones are only rotated to align with the tracked bones, preserving bone length. |