By andy2001
on Wed, 07/05/2017 - 21:37
I have an image target set, and a 3D object set to appear when the camera recognizes the image target. But when i move the image target off screen, the 3D object doesn't disappear. Sometimes it gets stuck at the corner of the screen where the image target went off screen, sometimes if I move the image target too fast it gets stuck where the image used to be. See screenshot of stuck object.
How do I get the object to only show up when the image target is visible?
Thanks!
Hello andy2001,
Hello andy2001,
Thanks! Although sometimes it
Thanks! Although sometimes it works fine and the model goes away when I move the target offscreen. But sometimes it gets caught and doesn't disappear.
Here is what my DefaultTrackableEventHandler.cs script currently looks like.
If you look at the
If you look at the OnTrackingLost() method, it tells you just how it's hiding your augmentations. It takes all the render components (Mesh Renderer, Sprite Renderer etc.) for the objects that are children of the ImageTarget, puts them into an array, and disables them via a loop.