Search Unity

AR Foundation: Set Init Camera Position in World

Discussion in 'AR' started by vapemo, Jul 21, 2020.

  1. vapemo

    vapemo

    Joined:
    Dec 9, 2019
    Posts:
    1
    Hey all,

    i've got just a little stupid question.
    I created a scene in Unity and used an AR Session Object.

    When I start the app, the AR Camera always start at Position (0,0,0).
    But I want to place the 3D Object of a whole Building in Unity and set the AR Camera to my position in the real world.

    So for example, when i'm in 3th floor, the AR Camera has to be also in the 3th Floor in Unity and not at (0,0,0).
    But when I change the Transform data of the Camera Object and start the App, it's at (0,0,0).

    Does anybody has a hint for me?

    Thank you & best regards
    Moritz
     
    swapnilNeo likes this.
  2. swapnilNeo

    swapnilNeo

    Joined:
    May 24, 2022
    Posts:
    1
    I am also looking for the solution. One solution I came up with is using QR codes at some places in building. Device camera will scan this QR code and re-position AR world position according to it. But I still don't know how to place 3D object after scanning QR code and re-position AR Camera according to it.
     
  3. NSWell

    NSWell

    Joined:
    Jul 30, 2017
    Posts:
    89
    Hi,
    If you are using iOS and ARKit , you can using ARWorldMap.
    And this is the ARFoundation sample for ARWorldMap.

    - You can using SFM(Struct From Motion) to localized the world map.You must wirte the algorithm by yourself.
    - Using Immersal SKD
    - QR-Code solution tutorial