cubeObject Tracking

Object Tracking scene demonstrates real-time object detection and tracking using the Quest SDK's ObjectTrackingManager. This scene captures a single camera frame to identify and track pre-scanned objects in the environment, applying pose estimation to align virtual content with physical objects.

This scene uses a single camera frame per tracking request, enabling quick object detection and continuous background tracking to maintain alignment.

Core Components

The scene includes the following key GameObjects:

  • MultisetSdkManager — Handles SDK authentication and initialization.

  • ObjectTrackingManager — Manages the object tracking process.

  • ObjectSpace — Parent GameObject for tracked object containers. Each tracked object gets its own child container automatically.

ObjectTrackingManager Properties

Property
Type
Default
Description

objectCodes

string[]

[]

Array of object codes to track. Maximum 10 codes allowed. Obtain codes from the MultiSet Developer Portal.

autoTracking

bool

true

If true, object tracking starts automatically after SDK authentication.

backgroundTracking

bool

true

When enabled, the manager periodically sends tracking requests in the background to maintain object alignment.

bgTrackingDuration

float

15

Time interval in seconds between background tracking attempts. Valid range: 5–30 seconds.

restartTracking

bool

true

If true, the manager re-tracks objects automatically when AR tracking is lost.

confidenceCheck

bool

true

When enabled, only tracking results with a confidence score above the threshold are accepted.

_confidenceThreshold

float

0.3

Minimum confidence score required for a tracking result to be valid. Valid range: 0.2–0.8.

showAlert

bool

true

If true, a toast message is displayed on tracking success or failure.

firstTrackingUntilSuccess

bool

true

When enabled, the first tracking request retries silently until it succeeds without showing failure messages.

Object Tracking Callbacks

Callback
Description

ObjectTrackingInit

Invoked when the tracking process is initiated by calling StartObjectTracking().

ObjectTrackingRequested

Invoked just before the captured frame is sent to the MultiSet API.

ObjectTrackingSuccess

Invoked when an object has been successfully tracked and its pose is applied.

ObjectTrackingFailure

Invoked when the tracking process fails (e.g., no object found, network error).

Public Methods

StartObjectTracking()

Manually starts the object tracking process.

Calling this method captures a single frame from the Quest passthrough camera and sends it to the MultiSet backend for object detection and pose estimation. Use this if autoTracking is disabled and you want to trigger tracking manually.

Setup

  1. Open the ObjectTracking scene from the imported samples.

  2. Select the MultisetSdkManager GameObject and configure your API credentials.

  3. Select the ObjectTrackingManager component and enter your Object Codes (up to 10).

  4. Assign the ObjectSpace GameObject where tracked objects will be placed.

  5. Adjust tracking settings (confidenceCheck, bgTrackingDuration) based on your needs.

  6. Build and deploy to your Meta Quest device.

Last updated