Log in or register to post comments

ImageTarget Child Canvas does not disappear on ImageLost

June 10, 2016 - 2:50am #1

Vuforia SDK Version: v5.5.9 -

Description with steps to reproduce: Simply add a Canvas UI-Element as an ImageTarget child. It won't disappear when the ImageTarget is getting lost. -

Development OS (Mac OS X, Windows, Linux): Mac OS X -

Mobile OS and Version: Android 6.0 -

Mobile Device Manufacturer and Model name: Nexus5 / Galaxy S6 / GearVR -

Do the Vuforia Sample Applications show the same behavior?: Since they don't have an UI-Element as ImageTarget Child no

ImageTarget Child Canvas does not disappear on ImageLost

June 10, 2016 - 7:42am #2

Hi, thanks for your report.

 

This is not a bug. 

The DefaultTrackableEventHandler, which is attached by default to the ImageTargets prefab (and other type of Trackables too), as the names suggest, provides you with a 'default' reference implementation of the ITrackableEventHandler interface;

The DefaultTrackableEventHandler disables the Renderers and the Colliders of any child game object when the target is lost, and enables them when the target is detected (found), as this is the most common scenario.

However this is not intended to cover all the possible scenarios, for example:

- enabling/disabling the playback of sounds, videos or other medias (if for example, your game object has some sound effect attached)

- enabling/disabling the rendering of UI Canvas elements which you may have added as child of the Target

 

For those and other special cases you would implement a customized version of the Trackable Event handler, by implementing the ITrackableEventHandler interface in your own custom class and by replacing the DefaultTrackableEventHandler with your own script in the Target.

 

 

Log in or register to post comments