By LunarExGames
on Thu, 05/18/2017 - 00:45
Hello. I was trying to find a way to make my AR objects disable when they are not in view (target lost).
The problem I'm having is that I have several animals on cards and have a script that when they are clicked they play an action. When the card is by itself, I can click on it and it plays the correct audio. However, when it's not in view anymore (target lost) and I click - it plays ALL the audio of the cards. Not sure why but is there a way to disable an object when target lost so it ensures that it doesn't conflict with other things? Would really appreciate some help with this.
Hi
Hi
I would have the same problem; hope somebody can help us,
Best and thank you :)
Hello,
Hello,
You can deactivate your Unity objects be unchecking the box at the root level of the game object. This can also be achieved programmatically by setting the game object's active state to false. This should prevent sound from being played on this object.
Thanks,
That's correct,
That's correct,
one way to do that is to have a script like the below attached to each Image Tracker object
using UnityEngine;
using Vuforia;