reckfellENGINE

XRController3D

XR-rig controller: pose and named input.

On this page
class XRController3DReckfellSharpInherits XREntity3D

XRController3D binds an Entity to a controller tracker. Parent directly under XROrigin3D; set Tracker=left_hand or right_hand first, then Pose=grip for a held-object visual. Numeric IDs 1/2 are not used here. Put artwork in a child Entity and adjust its local transform, because tracking replaces the controller transform.

IsButtonPressed, GetFloat and GetVector2 read internal action-map names, not labels or button paths. Without a tracker they return neutral values; these do not establish connection. Methods do not gate focus, tracking or interaction eligibility for you. GetInput returns an original-type Variant; dispose it with using.

Input events forward from the bound tracker and disconnect on unbinding. InputFloatChanged carries double although GetFloat returns float. ProfileChanged carries a profile string despite its argument being named role. Device removal does not guarantee ButtonReleased for every held action: clear interaction state on device or focus loss.

Synthetic tracker input, conversions, events, child transforms and unbinding were checked in the installed runtime. No real headset, physical vibration or rendered image was checked. Practical setup: XR components.

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

Constructors1

XRController3DConstructor
# XRController3D
C#
public XRController3D();

Creates a tracked Entity without a selected tracker. Parent directly under XROrigin3D, set Tracker, then Pose. Place artwork in a child Entity.

Methods5

GetFloatfloat
# GetFloat
C#
public float GetFloat(StringName name);

Reads an action: Float is returned as float; Bool converts to 1 or 0. Returns 0 for Vector2, a missing value or no tracker. Does not normalize or clamp the range.

Parameters
NameTypeDefault
nameStringName—
name

Exact internal action-map name; not a display label, button path or ordinary InputMap key.

Returns float

float value; Bool yields 0/1, incompatible or absent data yields 0.

GetInputVariant
# GetInput
C#
public Variant GetInput(StringName name);

Returns the raw action-value Variant. Without a tracker or for an unknown name it is Variant.Type.Nil. Check the type before conversion; dispose the returned C# Variant wrapper with using. Neither an event nor proof of tracking.

Parameters
NameTypeDefault
nameStringName—
name

Exact internal action-map name; not a display label, button path or ordinary InputMap key.

Returns Variant

Original-type Variant or Nil. Dispose the C# wrapper with using.

GetTrackerHandXRPositionalTracker.TrackerHand
# GetTrackerHand
C#
public XRPositionalTracker.TrackerHand GetTrackerHand();

Reads the bound tracker’s Hand; returns Unknown without a tracker. It is not inferred from the Tracker string. Hand assignment does not establish a current pose or input.

Returns XRPositionalTracker.TrackerHand

Tracker Hand or Unknown; not derived from its name.

GetVector2Vector2
# GetVector2
C#
public Vector2 GetVector2(StringName name);

Reads the action Vector2 unchanged. Float converts to (value, 0), Bool to (1, 0) or (0, 0); an unknown value or absent tracker yields Vector2.Zero. Applies no dead zone or normalization.

Parameters
NameTypeDefault
nameStringName—
name

Exact internal action-map name; not a display label, button path or ordinary InputMap key.

Returns Vector2

Vector2; a scalar occupies X, absent data yields Vector2.Zero.

IsButtonPressedbool
# IsButtonPressed
C#
public bool IsButtonPressed(StringName name);

Reads the current Boolean action value by internal name, not a one-frame event. Returns false without a tracker or value. Does not check focus or pose freshness; gate those separately.

Parameters
NameTypeDefault
nameStringName—
name

Exact internal action-map name; not a display label, button path or ordinary InputMap key.

Returns bool

Current bool; also false when input or tracker is absent.

Signals and events5

ButtonPressedEvent
# ButtonPressed
C#
public event XRController3D.ButtonPressedEventHandler ButtonPressed;

Forwards the tracker event when a Boolean action changes to true, carrying its internal name. Does not repeat each held frame. Does not gate focus or tracking; an absent tracker creates no synthetic press.

Handler parameters
NameTypeDefault
actionNamestring—
actionName

Internal action name. A vibration request requires a configured output action.

ButtonReleasedEvent
# ButtonReleased
C#
public event XRController3D.ButtonReleasedEventHandler ButtonReleased;

Forwards the tracker event when a Boolean action changes to false. Tracker removal does not itself synthesize releases for every button: reset interaction state on device or focus loss.

Handler parameters
NameTypeDefault
actionNamestring—
actionName

Internal action name. A vibration request requires a configured output action.

InputFloatChangedEvent
# InputFloatChanged
C#
public event XRController3D.InputFloatChangedEventHandler InputFloatChanged;

Forwards a changed numeric action and its name. The C# event value parameter is double; GetFloat returns float. Repeating the same value creates no event in the checked tracker. No automatic focus gate.

Handler parameters
NameTypeDefault
actionNamestring—
valuedouble—
actionName

Internal action name. A vibration request requires a configured output action.

value

New event double value; not the float returned by GetFloat.

InputVector2ChangedEvent
# InputVector2Changed
C#
public event XRController3D.InputVector2ChangedEventHandler InputVector2Changed;

Forwards a changed Vector2 action and internal name. Does not normalize axes or add a dead zone. Events from the old tracker stop forwarding after unbinding.

Handler parameters
NameTypeDefault
actionNamestring—
valueVector2—
actionName

Internal action name. A vibration request requires a configured output action.

value

New Vector2 without a dead zone or normalization.

ProfileChangedEvent
# ProfileChanged
C#
public event XRController3D.ProfileChangedEventHandler ProfileChanged;

Forwards a profile change from the bound tracker. Despite the parameter name role, the value is a profile string, such as an interaction-profile path, not left/right. Does not establish runtime support for every binding.

Handler parameters
NameTypeDefault
rolestring—
role

Tracker profile string; the parameter name is historical, not hand assignment.

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.