Search Unity

ARFoundation; Any updates on detecting the image is not being tracked anymore?

Discussion in 'AR' started by Flamacore, Jun 12, 2020.

  1. Flamacore

    Flamacore

    Joined:
    Dec 17, 2013
    Posts:
    140
    TL;DR: You cannot detect if a tracked image is removed so the prefab stays always visible. Is this updated in any way? This is a huge problem when tracking multiple images.

    Hey all. I've been working with ARFoundation since 1.5 and it's been a rough run generally. But along with live preview without the need of going through building & testing for each small iteration, there is one more feature that I believe we all need - for years actually.

    Detecting whether a tracked image is removed or is not being tracked anymore and no I'm not talking about TrackingState.Limited. I've tried checking for Limited tracking but it's too inconsistent. The prefab on the tracked image disappears and appears for no reason at all too frequently. Sometimes it does not even go to Limited even if the image is not visible to the camera or vice versa.

    TrackingState.removed is never called as many people can relate with their own tests I think.

    So any updates on this? Do we have tracking removed now? Or is that available just for MARS which is a paid subscription along with this free content (which I still wonder why). Or maybe a roadmap on this?
     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Unfortunately, this is not possible according to documentation:
    https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.0/manual/tracked-image-manager.html

    Determining when an image is visible
    There is no API to determine the visibility of an image. Generally, if the tracking state is Tracked, it will likely change to Limited when the image is not visible. However, there are other situations in which the tracking state can be in states other than Tracked.

    If this information is important to your application, considering comparing the ARTrackedImage's transform with the camera's view frustum.
     
  3. Flamacore

    Flamacore

    Joined:
    Dec 17, 2013
    Posts:
    140
    Yeah this was my approach with little to no success as well. I wonder how this became an oversight since it looks like just a no-brainer. Hate it when Unity has a package with unbelievable potential and ease of use yet still has few but highly important shortcomings.

    But yeah, one can only ask for so much :)