reckfellENGINE

XRBodyModifier3D

Apply body data to matched skeleton bones.

On this page
class XRBodyModifier3DReckfellSharpInherits SkeletonModifier3D

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:

C#
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
# XRBodyModifier3D
C#
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
# BodyTracker
C#
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
# BodyUpdate
C#
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
# BoneUpdate
C#
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
# GetBodyTracker
C#
public StringName GetBodyTracker();

Configured tracker name, not proof of its presence or data.

Returns StringName

Provider name, initially /user/body_tracker.

GetBodyUpdateXRBodyModifier3D.BodyUpdateEnum
# GetBodyUpdate
C#
public XRBodyModifier3D.BodyUpdateEnum GetBodyUpdate();

Configured mapping-filter mask, not real-body capabilities.

Returns XRBodyModifier3D.BodyUpdateEnum

Configured modifier-region mask.

GetBoneUpdateXRBodyModifier3D.BoneUpdateEnum
# GetBoneUpdate
C#
public XRBodyModifier3D.BoneUpdateEnum GetBoneUpdate();

Configured Full/RotationOnly mode; RotationOnly retains the Hips-position exception.

Returns XRBodyModifier3D.BoneUpdateEnum

Configured bone mode, initially Full.

SetBodyTrackervoid
# SetBodyTracker
C#
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.

Parameters
NameTypeDefault
trackerNameStringName—
trackerName

Exact registered XRBodyTracker name. Changing it needs no remapping when Skeleton and BodyUpdate are unchanged.

SetBodyUpdatevoid
# SetBodyUpdate
C#
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.

Parameters
NameTypeDefault
bodyUpdateXRBodyModifier3D.BodyUpdateEnum—
bodyUpdate

UpperBody/LowerBody/Hands mask; 0 is not a universal processing-disable command.

SetBoneUpdatevoid
# SetBoneUpdate
C#
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.

Parameters
NameTypeDefault
boneUpdateXRBodyModifier3D.BoneUpdateEnum—
boneUpdate

Full or RotationOnly; Max is the enum bound. Hips position updates in both modes.

XRBodyModifier3D.BodyUpdateEnum

ValueDescription
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

ValueDescription
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 XRBodyModifier3D.BoneUpdateEnum enum.

RotationOnly = 1

The skeleton's bones are only rotated to align with the tracked bones, preserving bone length.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.