Log in or register to post comments

Tracking ANY of images from DataSet

October 2, 2014 - 4:17am #1


how to track any of images from the single DataSet? To clarify: I need few images to be markers for the exact same GameObject meaning that if ANY of images from DataSet is detected it is used as ImageTarget.

My first idea was to just add multiple ImageTargets to the scene - each having "Image Target" propery set to diffetent target from SD but the problem is I would have to duplicate my GameObject (to make it child of that IT) which I really don't want.


Thanks in advance.

Tracking ANY of images from DataSet

October 16, 2014 - 5:28am #3

I went through the docs and did some code but I don't quite understand how to solve my problem yet.


To clarify: I want the same GameObject(s) to show up on any of the Targets from DataSet. So ideally I want to be able to change "Image Target" property at run-time depending on which Target is currently visible. I don't know how to do that tho.

That is how I am trying to solve this:


// in Update()

    var trackableBehaviours = TrackerManager.Instance.GetStateManager().GetTrackableBehaviours();
    // Loop over all TrackableBehaviours.
    foreach (TrackableBehaviour trackableBehaviour in trackableBehaviours)
      if (trackableBehaviour.CurrentStatus == TrackableBehaviour.Status.TRACKED)
        Debug.Log("I see: " + trackableBehaviour.Trackable.Name);
        // I now want to attach House GO to this Target but it does not work
        house_.transform.parent = trackableBehaviour.transform;
but It does not work for me. House model does not show up on that Target, it still only shows up on the ImageTarget originally set up on the scene. Please advise.

Tracking ANY of images from DataSet

October 2, 2014 - 11:34am #2

Check out the Add Content To a Target section of this article - https://developer.vuforia.com/resources/dev-guide/swappable-databases-unity

You can iterate through all of the active TrackableBehaviours to add event handlers, and then add your model to the target dynamically once it's detected.

Log in or register to post comments