bool Active { get; set; }

robot_2Generated
code_blocksInput

Description

The Active property of the TrackedObject class indicates whether the tracked object is currently accessible. If this property is set to false, the object's transform will not be updated, meaning it will not reflect any changes in position or orientation in the virtual environment.

Usage

Use the Active property to check if a TrackedObject is currently being tracked and updated. This can be useful for determining whether to perform operations that depend on the object's current state or position.

To set the Active property, simply assign a boolean value:

trackedObject.Active = true; // Enable tracking
trackedObject.Active = false; // Disable tracking

Example

// Example of using the Active property
TrackedObject trackedObject = new TrackedObject();

// Check if the tracked object is active
if (trackedObject.Active)
{
    // Perform operations that require the object to be tracked
    Transform currentTransform = trackedObject.Transform;
    // Use the transform for further processing
}
else
{
    // Handle the case where the object is not being tracked
    // Perhaps log a warning or attempt to reinitialize tracking
}