I’m doing Augmented Reality image recognition project (vuforia) and loading the .obj model from server when the image is recognized. The problem is, when my target found the loading text will start to display the percentage of load and if it comes at 99% and the camera is freezing to load the model. I’m not sure why the camera is freezing. How can we load model without freeze the camera?
var objData = ObjReader.use.ConvertFileAsync (modelString, true, standardMaterial);
while (!objData.isDone) {
Debug.Log (" objData is not there");
loadingText.text = "Loading... " + (objData.progress*100).ToString("f0") + "%";
yield return loadingText.text;
}
//myHealth.Progress (100); // done
loadingText.enabled = false;
string modelName = objData.gameObjects [0].name;
model = GameObject.Find (modelName); // find the model reference
model.name = targetIDModel; // change the model name to targetID !!!
}
GameObject modelClone = Instantiate( model ) as GameObject; //clone the model
modelClone.transform.localPosition = Vector3.zero; // bring the clone to origin
modelClone.transform.parent = itbModel.gameObject.transform; // pair the clone to the instantiated image target
modelClone.transform.localScale = Vector3.one;