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?
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.
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.