reckfellENGINE

XROrigin3D

Gameplay origin for a tracked XR rig.

On this page
class XROrigin3DReckfellSharpInherits Entity3D

XROrigin3D maps tracking space into the gameplay world. Parent the camera, controllers and anchors directly under it. For game movement move the origin or its parent body; do not correct tracking by moving the camera manually.

At runtime the first in-tree origin becomes Current automatically. Selecting another deactivates the previous one; disabling or exiting the active origin selects another available one. A detached object is not active. Current initializes no session and does not select the current Camera3D. The active origin publishes GlobalTransform to XRServer.WorldOrigin.

WorldScale is shared XRServer state: editing it through any origin affects the others. Finite values are clamped to 0.01…1000. Do not change the rig local Scale for this purpose. At WorldScale=1, the standard metric tracking model corresponds to one game unit per meter.

Origin selection, scale and world transforms were checked without a headset. Stereo output, cross-thread interpolation and real recenter were not tested. Complete movement example: XR locomotion.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

XROrigin3DConstructor
# XROrigin3D
C#
public XROrigin3D();

Creates a rig origin. The first origin entering the runtime tree activates automatically. Parent the camera and tracked Entities directly under it; creating an origin does not initialize XR.

Properties2

CurrentProperty
# Current
C#
public bool Current { get; set; }

Selects the active in-tree origin. The first added origin activates automatically. Enabling deactivates others; disabling or exiting an active origin selects another available one. Outside the tree the runtime getter returns false even after setting true. Starts no XR session and selects no camera.

WorldScaleProperty
# WorldScale
C#
public float WorldScale { get; set; }

Shared XRServer.WorldScale, not a per-origin scale. Editing through an inactive origin also affects the others. Finite values are clamped to 0.01…1000; supply a positive finite scale. Not Entity3D.Scale: keep the rig local scale at one.

Methods4

GetWorldScalefloat
# GetWorldScale
C#
public float GetWorldScale();

Reads the shared XRServer scale as float. Another origin sees the same value; WorldScale is not local Scale.

Returns float

Shared XRServer scale; not Entity Scale.

IsCurrentbool
# IsCurrent
C#
public bool IsCurrent();

true when this origin is active and inside the runtime tree. Editor mode returns the stored setting; not a device-availability check.

Returns bool

true only for the active origin inside the runtime tree.

SetCurrentvoid
# SetCurrent
C#
public void SetCurrent(bool enabled);

Selects the active in-tree origin. The first added origin activates automatically. Enabling deactivates others; disabling or exiting an active origin selects another available one. Outside the tree the runtime getter returns false even after setting true. Starts no XR session and selects no camera.

Parameters
NameTypeDefault
enabledbool—
enabled

Make this origin active; runtime status depends on being in the tree.

SetWorldScalevoid
# SetWorldScale
C#
public void SetWorldScale(float worldScale);

Shared XRServer.WorldScale, not a per-origin scale. Editing through an inactive origin also affects the others. Finite values are clamped to 0.01…1000; supply a positive finite scale. Not Entity3D.Scale: keep the rig local scale at one.

Parameters
NameTypeDefault
worldScalefloat—
worldScale

Positive finite shared scale; finite values are clamped to 0.01…1000.

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.