Search Unity

Help Wanted Access Image Tracking State

Discussion in 'Unity MARS' started by cam415, Aug 15, 2020.

  1. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    45
    Hello,
    I have a Mars Session that is referencing a MarsMarkerLibrary with one image. I would like to know how to access the tracking state of the active image marker in the scene through an external sript. For example, if the image is active and being tracked or if it loses tracking.
    Similar to doing this with ARFoundation

    Thanks
     
  2. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    45
    Ok so I was able to retrieve the tracking state by accessing the "queryState" of the image marker's proxy. Is this the only way to access this information? Also, seems like once the tracking starts it stays active even when I move the camera away from the marker so that it is no longer in view. In my experiments with ARkit, ARcore, and ARFoundation the tracking state would change to limited or none if the image was no longer in view. I can't seem to access the "limited" or "none" state using the QueryState call.
     
  3. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    264
    Hello @cam415

    You are correct, the tracking state should change.
    The tracking state not getting updated fix is coming soon on our 1.1 release
     
  4. leweyg_unity

    leweyg_unity

    Unity Technologies

    Joined:
    Jan 29, 2020
    Posts:
    38
    Hey @cam415, this feature will be better supported in our next release. Until then, it may be possible to find the "ARTrackedImageManager" object in the scene, listen for it's "trackedImagesChanged" events, and associate those via trackable id to the proxy results.
     
    jmunozarUTech likes this.
  5. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    45
  6. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    45
    got it. Is there an estimated date the new release will be out? Thanks
     
unityunity