Start a new topic

How to implement detection of multiple targets

How to implement detection of multiple targets

I read about identification of multiple targets in this post. In your multiple targets example (multipletargets.js) each Trackable2DObject is being assigned to a separate variable. I'd prefer to avoid this method and create all Trackable2DObjects in a loop as I'll have 50+ targets. In my case a play button for videos should be placed on the target like in your video playback states example. Each target should play an individual video.  So I mapped all target ids to the corresponding video url in an associative array. What happens is that only the last target in the array is recognized. What's going wrong here?

Best regards

Hi Christian,

Code looks good so far. I guess the first target is just not that good to track.
I recommend to define your augmentations in a list instead:



var targets = ;

that way you have easy access to all information and can easily extend augmentation types.

I also recommend you to create the obejcts "on the fly" instead by e.g. using wildcard as targetName to receive the targetName in onEnterFieldOfVision. That way you can implement a smart caching and destroy old ressources before creating new ones so that you can even augment 1000 targets without memory issues.
Login or Signup to post a comment