SpatialEntity.Tracked
BtnState Tracked{ get }
Description
Is the system tracking this entity right now? While
active, Pose and all component data are live. While inactive,
they’re last known and may be stale, or empty if the entity hasn’t
been tracked yet. For requests still in progress, like a new
anchor, check Status instead. Entities that are permanently lost
leave the entity list, except persisted ones, which keep their
identifier with Status Pending while storage loads them again.
Examples
Reading QR codes
public void StartQrCodes()
{
Spatial.Request(SpatialCapability.QrCode);
}
public void StepQrCodes()
{
// New lists each entity exactly once, on the frame it appears
foreach (SpatialEntity code in SpatialEntity.NewWith(SpatialComponent.Marker))
Log.Info($"Found a QR code: {code.MarkerText}");
foreach (SpatialEntity code in SpatialEntity.With(SpatialComponent.Marker))
{
// Codes keep their last pose out of view, so only show ones in sight
if (code.Tracked.IsActive())
Text.Add(code.MarkerText ?? "", code.Pose.ToMatrix());
}
}
Found an issue with these docs, or have some additional questions? Create an Issue on Github!