- Home /
Unity ARCore model rendering
I'm trying to place 3d models on images with ARCore 1.17 unity sdk for Android device. When camera recognizes image, it places the model on it, but when I cover camera on device (shows black screen), the model comes on this black screen and the other problem is that it places twice the model when image is recognized. I'd appreciate if someone can tell me how to set it right to remove model if image is not tracked and not placing it twice. I have this line in AugmentedImageVizualizerController:
else if (image.TrackingState == TrackingState.Stopped && visualizer !=null)
{
m_Visualizers.Remove(image.DatabaseIndex);
GameObject.Destroy(visualizer.gameObject);
}
This does not remove model. If I can solve above then I need to make app to detect 2 images and place different models on each images. How can I set it in ARCore example? How can I setactive for the models in AugmentedImageVizualizer.cs? I have in this file GameObject Model and I have also these lines:
if (Image == null || Image.TrackingState != TrackingState.Tracking)
{
Model.SetActive(false);
return;
}
I still cannot control setactive.