Include the following details (edit as applicable):
-
Issue category: Image Target Updating
-
Device type & OS version: iOS Only
-
Host machine & OS version: Mac
-
Issue Environment : On Device /
- **ARDK version4.2.3:
- **Unity version2021.3.21f:
Description of the issue:
Ok, so I feel like im going crazy. On Android, my image target will flag AnchorUpdated constantly, even if the img isnt in camera view, and I swear this was the behaviour on iOS as well. But now that im working on iOS again, scanning and looking at image targets only flags AnchorUpdated once, maybe once or twice more if i take it fully out of frame and than back in frame, and doesnt flag AnchorUpdated at all if its out of view. Typically this would be fine, but im actually relying on recieving multiple image updates before I react to AnchorsUpdated seeing my image target.
Im very confused, i swear the behaviour was the same on both devices, and I had previously tested this on both devices, but now no matter what I try, only Android flags AnchorUpdated for image targets constantly. Am I missing something here?
What you are experiencing is the current expected behaviour, as you will receive the following events:
1: Image detected - image is found and added to the updated list
2: Image updated - sends an update per frame for the currently detected location of the image, if the image is no longer in view, you get the last detected position
3: Image lost - never fired.
The docs say to add on (1) and then update on (2), but in my experience, it is better to just use the Updated loop and manage the lifecycle yourself. When an unknown image is found, add it to your tracking list, if an image was previously in your tracking list, then update it.
A word of caution, the Update loop will also emit anchors found against a plane, not just images, so be sure to add the Anchor type check as shown in the examples BEFORE you start checking for images
Hope this helps.
Thanks, this is kind of what I figured but wasnt sure so this afirms that. So android just gets alot more update readings because its not as stable as iOS when it comes to pretty much anything AR.
1 Like
To be honest, I get pretty much the same results on iOS too.
Seems Niantic uses ARCore and ARKit under the hood for image detection.