Log in or register to post comments

What event is fired when a user defined target is created

May 13, 2017 - 11:12am #1

Looking to start some audio playback when my userdefined marker and 3D image is rendered for the first time.  How can i get a script to fire at that time?

Big thanks for any help.

What event is fired when a user defined target is created

May 15, 2017 - 11:43am #2

Hello,

In the Vuforia User Defined Targets sample, select the UserDefinedTarget prefab. In that prefab, you will see a script called "Default Trackable Event Handler".

Within, there is the OnTrackableStateChanged() function which is called when a trackable state changes. If you're looking to determine when the initial TRACKED event happens, you can modify the OnTrackingFound() function, or create one of your own.

One additional note, it can take as few as two (2) frames for Vuforia to move from the DETECTED to TRACKED state. Thus, if you're looking for a more persistent state, I recommend using TRACKED or EXTENDED_TRACKED, depending upon your use case.

Thanks.

Log in or register to post comments