Skip to main content

Object detection & transforms

Runtime consumption of detected markers, 6-DoF objects, and XR-headset transforms. For the task-focused guide see Object-detection consumer.

ObjectDetectionConsumer

Moved to ObjectDetectionConsumer.

InstanceType

enum

{ Marker, Object } — a simple 3-DoF Marker vs a full 6-DoF Object.

TrackedInstance

class Unity component

Attached to each spawned marker/object; the per-object data model.

MemberTypeMeaning
Idstringserver marker/object id
TypeInstanceTypeMarker or Object
ColorNamestringserver type/color label
ColorColorresolved Unity color
PositionVector3current world position (meters)
Radiusfloatmarker radius ⚠️ (units appear to be meters / a scale × MarkerSize)
CaptureTimedoubleserver capture timestamp (seconds)
IsSkeletonMarkerbooltrue for skeleton-joint markers
RendererRendererfor visibility/material control
#SetPositionmethod
public Vector3 SetPosition(Vector3 position, float SmoothPositionalThreshold = 0, float SmoothPositionalFactor = 0);
Parameters
positionVector3target world position (meters)
SmoothPositionalThresholdfloat ?smoothing threshold
SmoothPositionalFactorfloat ?smoothing factor
ReturnsVector3the applied position
#ApplyFiltermethod
public void ApplyFilter(double processNoise, double measurementNoise, bool useDiscreteWhiteNoise,
bool useAcceleration, double futureDeltaTime);

Configures the per-instance Kalman filter.

caution

⚠️ SetPosition assigns localPosition; the smoothing branch compares against the just-set value, so the threshold/factor smoothing may be a no-op as written.

MarkerItem

serializable class

Maps a marker type to a prefab to spawn in its place: MarkerType (string), Prefab (GameObject), Enabled (bool, default true).

TrackedMarkerExtensions

static class

Interpret marker IDs:

#Marker-ID helpersmethodstatic
public static bool IsSkeletonMarker(this TrackedMarker marker); // Id contains "Skeleton"
public static bool TrySkeletonMarkerInfo(this TrackedMarker marker, out string skeletonId, out string jointName);

⚠️ exact skeletonId / jointName formats depend on the server's marker-ID scheme.

ObjectTransformConsumer

Moved to ObjectTransformConsumer.

ObjectInfo

Moved to ObjectInfo.

ObjectTransform

Moved to ObjectTransform.

XRHeadsetTracker

Moved to XRHeadsetTracker.


Next: Hands, controllers & boundary.

Was this page helpful?