Skip to content

TrackedBodyManager

Inherits from: MonoBehaviour

Properties

Property Type Access Description
Instance TrackedBodyManager get
BadFrameCount int get/set
GoodFrameCount int get/set
WasTracking bool get/set
FramesSinceTrackingStarted int get/set
Phase ARPhase get/set
LastGoodPosition Vector3 get/set
LastGoodRotation Quaternion get/set
HasLastGoodPose bool get/set
IsARPoseFusionActive bool get
IsARPoseFusionActive bool get
ManagedBodyCount int get Number of bodies currently being managed.
GlobalHistogramPeak float get Global histogram peak observed across all root bodies. Used as reference for quality calculations. Adapts to lighting conditions. Clamped between PEAK_MIN and PEAK_MAX. Resets to HISTOGRAM_GOOD when no root body is tracking.

Methods

Method Returns Description
IsBodyInARMode(TrackedBody body) bool Check if a specific body is currently in AR pose fusion mode (Anchored or Recovery).
GetBodyARPhase(TrackedBody body) string Get the current AR phase for a body (for debugging/UI).
ResetAll() void Reset state for all bodies. Stops tracking, clears AR states, and triggers detection (which resets poses to initial).
ResetBody(TrackedBody body) void Reset state for a specific body. Stops tracking, clears state, and resets pose to initial.
SetBodyWorldPose(TrackedBody body, Vector3 position, Quaternion rotation) void Manually set the world pose for a body (useful for external initialization).
RefreshARAvailability() void Re-detect AR Foundation availability. Call if AR session state changes.
UpdateAllBodies() void Updates all tracked bodies: fetches status from native and prepares for state processing. Called each frame by FormulaTrackingManager. State machine logic runs in OnBeforeRender via ProcessActiveBody.