Detecting distance from a tracking image


If I want to track, say, 80 images, not at the same time, but only show content when there is only 1 of them in view (they are pretty close to eachother). How would I go about that? If there are 4 (or 2 or 68) in view, I don’t want to show anything and I don’t want to auto-select the first one it finds (which is what would happen if using the posted code I guess). Using a loop to look for target images and keeping count of them could be a way to go, but that might get too slow and unstable.

In the same case, could I maybe force my user to get closer to 1 of the targets by setting some kind of minimum-size of the target to trigger any content? If you’re far away from it, the target might be 5% screen size, and I want it to trigger when it’s at least 50% screen size (this gives me only 2/3/4 targets in viewport at the same time, which could work with a loop to check how many are in view).


Hi @polygongraphics,

This is a really cool idea, however, it’s not something that is currently possible with our tools.

To have something like this working, would mean a revamp of our current scanning system which at the moment isn’t something we are looking to do.

A workaround would be to have a zapcode on each of the 80 images. This zapcode would then run the unique experience with that specific image as the target. There is no way of checking whether this would be the only target or zapcode in view, so the first seen zapcode will initiate.

Hope this helps and let me know if you have any further questions about this. :slight_smile:



Hi George,

thanks for the answer, but having 80 zapcodes is not really an option. This would require the user to exit the experience each of the 80 times and rescan a new one, which is something we’re looking to get past. We want a smooth running single experience, with quick automatic scanning of each image.

We’re trying to persuade a client and it’s either us with zappar or another company with a custom-made app. But I can’t really think of any way a custom app could do the thing we’re trying to achieve. If anyone has any idea, maybe we can “translate” that to the zappar workflow…