Log in or register to post comments

How to restart find and tracker at runtime?

December 24, 2019 - 2:00am #1

Hello,

 

I want to restart find and tracker at runtime, rather than reloading the scene,how to do ?

 

I tested the following code , but  it looks like it's still affected by the last tracker.

 

ObjectTracker tracker = Vuforia.TrackerManager.Instance.GetTracker<ObjectTracker>();

            tracker.Stop();



            foreach (DataSet ds in tracker.GetDataSets())

            {

                tracker.DeactivateDataSet(ds);

                tracker.ActivateDataSet(ds);

            }



            tracker.Start();

How to restart find and tracker in runtime?

 

How to restart find and tracker at runtime?

January 7, 2020 - 3:19am #2

Hi,

The approach seems to be correct one. Another thing to consider if you have extended tracking activated in the scene, this might affect and could be the culprit.

In the PlaneManager.cs script, found in the Core Sample app, we show how to reset all Trackers including the Extended Tracking one. ResetTrackers()

Thank you.

Vuforia Engine Support

Log in or register to post comments