Search code examples
unity-game-engineaugmented-realityvuforia

Augmented Reality: Tracking 2 objects simultaneously using 2 image targets


Scenario: I have 2 similar image targets and 2 different objects associated with each image target and need to track these 2 image targets placed side by side simultaneously.

I have placed AR Camera and set properties "Max Simultaneous Tracked Images" and "Max Simultaneous Tracked Objects" to 2.

for example: I have 2 image targets called ImageTarget1 (left image) and ImageTarget2 (right image) and 2 objects associated with each image target are called 9 and 9C respectively.

Issue: Ideally when camera encounters first image (left image), it should load object 9 and when second image (right image) is encountered it should load object 9C, but even when only first image is encountered, it loads both the objects 9 and 9C. i.e. Single image is tracked twice and objects associated with both image targets are loaded for single image.

Please refer the attached images. First image (UnityIssue1.png) shows the design view and how image targets and associated objects are placed. Second image (UnityIssue2.png) shows run time view and how single image is tracked twice to show both the objects.

Requirement: One image should track only associated object and when second image is encountered then second associated object should be loaded regardless of order (right or left)

Kindly provide solution.

Unity Version used: Unity 5.2.1 Design View
enter image description here

Runtime View enter image description here


Solution

  • Targets you are using are too similar. You need to have different image targets to avoid Vuforia's confusion to make it work.