Log in or register to post comments

On specific TrackingFound play video, but just in one target.

November 12, 2012 - 12:11pm #1

hi look i have this code

 

I have 3 targets, but i wanna that just ONE target of those 3 when tracking found do somethingm but just on this target not in the other targets.. does annyone know how to??,

      private void OnTrackingFound()

        {

            Renderer[] rendererComponents = GetComponentsInChildren<Renderer>();

    

            // Enable rendering:

            foreach (Renderer component in rendererComponents) {

                component.enabled = true;

            }

    

            Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " found");

    

    }

 

 

 

 

 

 

 

 

 

 

 

 

 

for example, 3 targets  but one of those have to appear a video when focus this target, but it have to stop when the other targets are focused.

 

 

 

please help i so stock

On specific TrackingFound play video, but just in one target.

November 12, 2012 - 12:22pm #2

If you define your Multiple Simultaneous Image Targets value on the ARCamera for 1, this will prevent more than 1 augmentation from rendering at any time. 

If you want to enforce a specific sequence or priority of rendering, beyond what is provided by the MSIT, then you'll need to define this behaviour in the event handler. For example, in your second case you would set your MSIT for 2, to allow multiple detections, and then deactivate the video programmatically if the other targets is detected - you could determine this by looking for its TrackableName.

Log in or register to post comments