"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Remove Object when Tracker is no longer visible?

Hey,

 

I want to remove an object when the tracker is no longer visible. So far I understood that the object will still be visible when "Extended Tracking" is enabled, although I need this for certain other objects (e.g. videos). Can I disable this only for certain trackers? So far I understood that it's only is available globally...

 

Thanks in advance for any help!

Hello,

Despite Extended Tracking being enabled globally, you can still poll the state of each trackable: https://library.vuforia.com/content/vuforia-library/en/articles/Solution/tracking-state.html

Thanks for the input, but I'm not sure if I got that quite right.

 

I added the following function to protected virtual void OnTrackingLost():

 

Destroy(objectx.gameObject);

Hello,

I suggest that you review the DefaultTrackableEventHandler.cs script in the Vuforia Engine Core samples. This provides an example for how to poll for tracking status changes, and actions to be taken when tracking is lost and/or found.