Search Unity

Problem object changing its position when I change the height of the mobile device.

Discussion in 'AR' started by erik91, Mar 11, 2020.

  1. erik91

    erik91

    Joined:
    Dec 5, 2016
    Posts:
    3
    Hello, I am trying to instantiate an gameobject on the ground, the gameobject will spawn with multiple childs that need to look like they are around 1M underground. But my problem is that they look like they are above ground and another problem is when my placed object is very large, it will move up and down if my mobile device also goes up and down or atleast it looks that way. Is there any way to remove this effect/cancel it from moving up and down with the camera? And is there a way to let the object appear underground?

    Thanks in advance.

     
  2. Alexis-Dev

    Alexis-Dev

    Joined:
    Apr 16, 2019
    Posts:
    121
    Hello,

    Did you try to use ARAnchor to instantiate your prefab?

    Create a Prefab with childs 1 meter underground.
    Track the horizontal plane and raycast on it to place the ARAnchor.

    Bests,
    Alexis
     
  3. erik91

    erik91

    Joined:
    Dec 5, 2016
    Posts:
    3
    yes I tried it but sadly that didn't work
     
  4. Alexis-Dev

    Alexis-Dev

    Joined:
    Apr 16, 2019
    Posts:
    121
    Strange!

    What ARFoundation version do you use?

    Alexis
     
  5. erik91

    erik91

    Joined:
    Dec 5, 2016
    Posts:
    3
    never mind I fixed it the problem was the viewing distance lowering it fixed the problem.