"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Load Dataset from path cause camera unstable

Hello,

First of all, I apologize for my bad English.

I have made an AR app, want it load dataset from persistentDataPath. It looks good at first. dataset has been load, imagetargets has create. But if attach something to imagetargets, it will be enable,but nothing can display before camera, because ARcamera is flying around scene, and imagetargets not follow it.

Here is my code, someone can help me? Thanks!

 

//Load function

public void LoadRecog()     {

DataSetHandle.LoadDataSetFromPath(Application.persistentDataPath+@"/Vuforia/basketball.xml");                 DataSetHandle.ConfigVideoTrackable("2", VideoPlane);  

}

//DataSetHandle.cs

public static void LoadDataSetFromPath(string absolutePath)     {         ObjectTracker objectTracker = TrackerManager.Instance.GetTracker<ObjectTracker>();         if (!DataSet.Exists(absolutePath, VuforiaUnity.StorageType.STORAGE_ABSOLUTE))         {             Debug.Log("load dataset Exists null");             return;         }         else         {             objectTracker.Stop();             dataSet = objectTracker.CreateDataSet();             if (dataSet.Load(absolutePath, VuforiaUnity.StorageType.STORAGE_ABSOLUTE))             {                 objectTracker.ActivateDataSet(dataSet);             }             objectTracker.Start();         }     }

 

 

Hello,

This behavior sounds like your world center mode being set to DEVICE, rather than FIRST_TARGET. Please check the following setting on your ARCamera game object: Vuforia Behaviour->World Center Mode.

Hello medabit,

Thanks for your advice, I have checked ARCamera's world center mode, set it to FIRST_TARGET will cause camera to fly, if set it to DEVICE or SPECIFC_TARGET, founded imagetarget will go to fly, all setttings are not as expected.