I find myself struggling on how to detect (via code) when specific image targets have been activated, or detected, or scanned, instantiated, whatever is the proper term for when the object is tracked to the image you have in your database. For example if I have 5 different image targets and I want to keep track of how many times each of them have been activated, how can I do this via code?
I know there is "OnTrackingFound" found in "DefaultTrackableEventHandler" however this is for all activated ImageTargets and does not take into account individual ones.
I dont believe there is such a function in the vuforia api so I think this will have to be achieved via some sort of bools in the code but I dont know how to do that either for the same reasons as the title, that I dont know how to detect if an image target has been activated. I cannot put some bool on the Start() method either since those just activate on application launch anyway and not when they are spawned via imageTarget recognition.
Hi,
Hi,
you could write a script like this:
@sebben thanks for the quick
@sebben thanks for the quick answer but could you please explain what "call it from OnTargetFound of each Image Target" means?
You can drop the script on
You can drop the script on any GameObject, maybe you create a new one.
Oh I see it now, I didnt even
Oh I see it now, I didnt even realize that was even there. Thank you very much!