Search Unity

Question AR Foundation - Make image tracking object glued in the world

Discussion in 'AR' started by craftercis, Mar 18, 2022.

  1. craftercis

    craftercis

    Joined:
    Nov 27, 2017
    Posts:
    16
    Hello!

    Is it possible that when I scan a picture from the library and then spawn an object on it. To leave this object in the world forever. So the position and rotation should no longer be updated.

    I want to try this because I now experience a lot of jitters when I spawn an object using image tracking. My image target is fixed in the real world so it never moves. That's why I don't see the point of constantly updating the transform.

    Hopefully, someone can help me with this.
     
  2. Blarp

    Blarp

    Joined:
    May 13, 2014
    Posts:
    270
    Make a button that starts a scan, then end the scan like 10seconds later.

    Start Scan
    arOrigin.GetComponent<ARTrackedImageManager>().enabled = true;
    arOrigin.GetComponent<ARPlaneManager>().enabled = true;
    arTrackedImageManager.trackedImagesChanged += OnImageChanged;

    End Scan
    arOrigin.GetComponent<ARTrackedImageManager>().enabled = false;
    arOrigin.GetComponent<ARPlaneManager>().enabled = false;
    arTrackedImageManager.trackedImagesChanged -= OnImageChanged;
     
  3. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
    shivanshmywhoosh and mes_dev like this.
  4. shivanshmywhoosh

    shivanshmywhoosh

    Joined:
    Feb 28, 2023
    Posts:
    4
  5. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062