c# - Vuforia model target issue


Keywords:c# 


Question: 

How can I keep the augmentation visible after the initial target has gone out of sight? I am having this issue with the Vuforia model target. I am trying to keep the model augmented once the initial target is out of sight, however I am unable to do so.


1 Answer: 

Use Extended Tracking, as described here: Extended tracking.

// Starts/stops extended tracking for a given trackable
public void UseExtendedTracking(string trackableName, bool enabled) 
{
    IEnumerable<TrackableBehaviour> tbs = TrackerManager.Instance.GetStateManager().GetTrackableBehaviours();

    foreach (TrackableBehaviour tb in tbs) {
        // check trackable name
        if (tb.TrackableName.Equals( trackableName )) {
            if (enabled) 
                tb.StartExtendedTracking();
            else
                tb.StopExtendedTracking();
            return;
        }
    }
}