Log in or register to post comments

Two Targets one Object

October 20, 2017 - 6:38am #1

Hi,

I want to create an AR-App with two Image targets and one object. When the camera recognizes Target A or B the object should appear with all the features I added (a button and when you hit the button you see what's inside the object). It is very simple.

When the camera recognizes target A the object appears and the features I added. Everything works. So far so good.

Now I want that as well for target B. If I just copy the ImageTarget and change in "Image Target Behaviour (Script)" the Image Target to B the object appears and the button as well. Now when i hit the Button the script is executing but nothing is happening with the object. With Target A everything still works.

A little Summary if it was too complicated:

If the camera is tracking Image Target A or B the same Object should appear. So two possible targets and it should work with both but I is only working with one...

Can you please help?

Cheers

 

Two Targets one Object

May 14, 2018 - 12:28am #9

Hi, I don't know if it's too late or not, but I'll show you my solution: you have two target images A and B and an object C that should be child of both target images, you make B child of A, and C child of B, so C is both child of A AND B. When either A or B is shown, the object C is renderized. The problem is that A and B should be perfectly aligned in the reality or you will see some glitching when you pass from one target to the other. Hope it helps

Two Targets one Object

October 25, 2017 - 9:25am #8

Would you be able to provide a screenshot and then either steps to take to reproduce this in the sample app or a small sample project displaying this issue?

Thanks,

-Vuforia Support

Two Targets one Object

October 25, 2017 - 12:07am #7

Okay thank you. But the object sticks unnatural to the camera and not like it is usual for extended tracking. It seems like the object is stuck in one corner and is not moving any more.

This problem only appears when I use more than one Image tracker

Tow Targets one Object

October 24, 2017 - 11:37am #6

This can happen with extended tracking if you haven't moved far from the original target. You'll need to write some app logic to stop rendering or disable extended tracking after certain conditions have been met (target has moved by X amount or other target detected?).

Thanks,

-Vuforia Support

Tow Targets one Object

October 24, 2017 - 2:20am #5

Hi,

Ah okay now I understand. Thank you. It works but when the camera once recognizes the tracker and then looses the tracker the object is still visible and it's stitched to the screen. And sometimes it disappears as it should. I use extended tracking in my App.

How can I solve this last and hopefully small problem?

Thank you in advance for your help again.

 

Tow Targets one Object

October 23, 2017 - 9:10am #4

Hello Trackerless,

The second solution dpizzle mentioned is to have your object with the button that you want to modify be separate from the two Image Targets. Then, upon detection of either target, parent the main object to this Image Target and apply any modifications to this object as desired. Once you lose tracking on this Image Target, un-parent the main object from that Image Target. Repeat this for every time an Image Target is detected. This will allow you to share the same object between the two targets.

Thanks,

-Vuforia Support

Tow Targets one Object

October 23, 2017 - 7:01am #3

No sorry this doesn't work. In the first solution the object appears but no buttons appear to see the inside of the object.

Maybe this is because of the scripts. So I put the scripts on the prefab objects as well but that didn't work.

I don't really understand what I need to do for the second solution. Sorry

Tow Targets one Object

October 20, 2017 - 8:57am #2

You could:

Make a prefab of you object and parent to both your image targets.

or

Have your object a child of one and then reparent it to the other if it's detected.  Look at DefaultTrackableEventHandler script.  In the method OnTrackableStateChanged.  You can check the current trackable name and handle from there.

Log in or register to post comments