Search Unity

Toggle between image and plane tracking

Discussion in 'AR' started by ElinH, Mar 4, 2019.

  1. ElinH

    ElinH

    Joined:
    Aug 29, 2017
    Posts:
    18
    I try to place my 3D object initially with an image tracker. However, my 3d object trembles.
    As soon as I cover the tracker and the plane tracking works my object is stable.
    I just tried to turn off the image tracking script in the example scene, but the image tracking still runs according to debug.
    Anyone have any idea how I can use image tracking to place my geometry but can switch to plane tracking as soon as it is placed?
     
  2. sebasopp

    sebasopp

    Joined:
    Jan 24, 2019
    Posts:
    2
    I do something similar with the ARKit Plugin. In the GenerateImageAnchor Example I edited the UpdateImageAnchor() function. I just make a if(bShouldTracking) check with a boolean, that I toogle with an UI Button.
    So when I got my ImageAnchor tracked, i disable the Update Function and the WorldTracking runs on with my object staying in place...
    Also, because my object is standing straight up, i only track position and the y-Rotation.
    Maybe that help you?
     
  3. ElinH

    ElinH

    Joined:
    Aug 29, 2017
    Posts:
    18
    It worked kind of. I'm using the visual scripting tool bolt (too stupid to code)
    I send an event to my system in the UpdateImageAnchor class and handle the positioning in my system.
     
    Last edited: Mar 5, 2019