"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Tracking Positioning help

I want to know where the trackable positioning takes place. I have a dynamically created model each time an image target is tracked. Now what happens when i have more than 1 image target in the view (aka tracking) The objects all "follow" a single target. For instance i have tracker1 ->model 1 and tracker2->model 2 and when both are shown and I move tracker 1 both models follow it instead of model 1 following tracker 1 and model 2 staying in playce. 

So if someone can help me it would be much appreciated.


Wed, 06/27/2012 - 16:27

It's likely that both models are being created as a child object of the same Trackable. Have you confirmed that their transform.parent objects are what you expect?


No i haven't I'm not even sure how to do that. 

Below is the code I am using in the onTrackerUpdated function of Trackable Behavior




Wed, 06/27/2012 - 17:58

I would recommend doing this within the Trackables event handler. You can use the mTrackableBehaviour reference to assign the child objects in that context.


e.g. here is an example using a cube primitive..


GameObject cube;

Well at the current time I have no way to call onTrackingFound(). Since I only have an ARCamera game object and no Image Targets in the scene. 

Ill try to somehow add an image target into the scene but I dont know if I can do that dynamically but i will try.


Wed, 06/27/2012 - 18:28

Take a look at the section on Swappable Datasets in the Getting Started Guide under Mastering Advanced Topics. There's an example of how to obtain Trackables from the active dataset and add event handler components.


Ok the way I am reading the Swappable Data Sets page it looks to me like your already have to have an Image Target in the scene. Am I reading that right becuase it is just not clicking for me how to create an image target dynamically and then add the component.

Ok i have figured out how to do this with the swappable data sets. Im not sure if it is a proper way or if It is a hack but here it is:

In Trackable Behavior i have added