Search Unity

Question Keep object in place after image tracker lost

Discussion in 'AR' started by JannickL, Jul 3, 2020.

  1. JannickL

    JannickL

    Joined:
    May 18, 2016
    Posts:
    78
    Hi there,
    how can I keep an instantiated object (from image tracker) stay at the correct position in space after the image tracker got lost or was removed? So that I can move around it even if the tracker got lost.

    Maybe its important to know that I create the image library in runtime using a job handle.

    Thank you in advice,
    Janiick
     
    Last edited: Jul 3, 2020
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,144
    You can save last tracked camera position and then get rotation data from Input.gyro. But gyroscope is not able to give you data about position, only orientation.
     
  3. Alexis-Dev

    Alexis-Dev

    Joined:
    Apr 16, 2019
    Posts:
    121
    If I remember correctly (because I use a self made Image tracker), you can add an ARTrackedImage component to the GameObject you will instantiate and you uncheck : Destroy on Removal.

    Best,
    Alexis