Include the following details (edit as applicable):
-
Issue category: Image tracking
-
Device type & OS version: Any
-
Host machine & OS version: ANy
-
Issue Environment : On Device
-
Xcode version:
-
ARDK version: 2.4.1
-
Unity version: 2021.3
Description of the issue:
Currently, once a TrackableImage has been detected, it is continually updated, even when no longer in view, additionally, the “ImageLost” event never fires meaning tracked objects can never be destroyed.
Is there a way to force the ImageTracking to remove a trackable from it’s detected list, or at the very least, prevent it from being updated until it is seen again?
For those interested, the only way I found to be able to “reset” an anchor so it could be detected again, is to Remove and then Add the Tracked Image to the ImageDetectionManager.
Just remember to cache the trackable images manually to reuse them.
To detect WHEN is the right time to “remove” them, I found the best way was to check the distance from the original TrackedImage reference and also to test when the tracked image was no longer visible to the camera by checking the Renderer.iSVisble flag. However, you will need to decide which method works best for you.
Thank you for this question. I haven’t been able to find a direct way to handle this in the documentation but our engineers are looking into this and I will let you know what they can find.
Hi Mr. Jackson, I got confirmation from our engineers that your solution is the expected one. Your software will have to track these gameobjects and remove them in Unity when they’re not needed. Thank you for letting us know this point wasn’t clear right away. We’re always looking for ways to make this process easier