Log in or register to post comments

Using a target to control the state of another target.

February 3, 2020 - 12:21pm #1

I recently started using unity and would need some help with a newbie problem that I wasn't able to find a answer for on Google or Youtube. Thought I ask here for more direct responses.

Is there a built-in method that returns a bool when a target is visible to the camera? I looked on the Vuforia documentation, but wasn't able to find it because there is a giant list of classes and functions, and I might have overlooked it. Also, can triggers be enabled and disabled in the scene while the app is running so that they no longer trigger w/e experience they were meant to?

Thanks in advance for your help. :)

 

 

 

Using a target to control the state of another target.

February 4, 2020 - 12:39pm #3

Thank you for the quick reply. I am having trouble accessing the method, I'm guessing I'm trying to use it incorrectly.

I attached the DefaultTrackableEventHandler script to my target game objects. I'm trying to access the method by: targetObject.GetComponent<DefaultTrackableEventHandler>().OnTrackingFound(), but can't access the the OnTrackingFound() method. The only method I can access is OnTrackableStateChange().

N/m, figured it out. had to Inherit than override the OnTrackingFound(). Thanks again. :)

 

Using a target to control the state of another target.

February 4, 2020 - 3:54am #2

HI

We have in the DefaultTrackableEventHandler.cs a function called OnTrackingFound(). This "activates" the 3d objects once the image target is recognized. You can piggyback this function and also add your desired events.

My advice would be to install the Vuforia Core sample app from the Assetstore and go through our demo app.

Thank you.

Vuforia Engine Support

Log in or register to post comments