Search Unity

Moving AR Camera (AR Foundation)

Discussion in 'AR/VR (XR) Discussion' started by igli15, Nov 13, 2019.

  1. igli15

    igli15

    Joined:
    Mar 8, 2018
    Posts:
    2
    I am trying to move the AR Camera to a position in order to show an object in front of the camera. To achieve this i move the ARSessionOrigin so the parent of the AR Camera to that position. The problem is that the camera is offset in weird ways and its never at the right spot. However when i disable "Tracked Pose Driver" Component attached to the Camera then it works but the camera doesn't move around anymore.
    Anyone has any ideas how to solve this problem?
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,821
    Hey there @igli15, can you provide us with some additional information? Why are you wanting to move the camera, instead of moving the object? Additionally, can you please clarify a big more what "offset in a weird way" means?

    Thanks!
     
  3. igli15

    igli15

    Joined:
    Mar 8, 2018
    Posts:
    2
    Hey thank you for responding,

    Let me provide some more context.
    Currently i am using the ARFoundation + OpenCV for marker detection. The marker detection and object placement works correctly as i have tested it, however I want to turn off marker detection once a marker is detected and placed and use the ARFoundation camera controller to move around the scene. The markers are supposed to be a backup in case drifting occurs.
    As you can see on the first image the marker is detected and placed correctly. However the moment i hide the marker with my finger the camera seems to move to the wrong position. I want it to stay where it was and move around relative to the last detected position.
    To clarify I am moving the camera parent and not the marker object itself.

    IMG_6702.jpg IMG_6703.PNG
     
    Last edited: Nov 14, 2019
  4. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,821
    Thanks for the additional details! Give this a shot:

    MakeContentAppearAt(Transform, Vector3, Quaternion)
     
    MiVenTech and makaka-org like this.
  5. Sebight

    Sebight

    Joined:
    Sep 26, 2020
    Posts:
    26
    Sorry for this huge bump. Is moving the AR camera still not possible @TreyK-47 ?
     
  6. EBRUBOZKURT

    EBRUBOZKURT

    Joined:
    Feb 10, 2021
    Posts:
    3
    Hello, I'm new here, I hope my question is relevant to this topic.

    I upgraded my project to URP but my camera does not recognize the place and does not place my object on the ground. I guess I have to change something in the rendering settings on the AR camera but I couldn't find what it was. You can see my settings in the screenshot below.

    Thanks in advance, have a nice day


    upload_2021-8-30_2-26-6.png
     
  7. EBRUBOZKURT

    EBRUBOZKURT

    Joined:
    Feb 10, 2021
    Posts:
    3
    @TreyK-47