Search Unity

Feature Request Set AR Session Origin

Discussion in 'AR' started by adammpolak, Jul 6, 2021.

  1. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Currently there is no way to "set" where the Session Origin is.

    If I wanted to "move" an AR Player to a position in the map in a networked game, the current approach does not work.

    MakeContentAppear at won't work for this use case because content can't move as it is a shared experience, especially when players are moving around a lot.

    A MakeSessionOrigin is a necessary addition to have AR players be able to relocalize in scenes.

    If I relocalize to a position, I would want my session origin to be "there" (because that is where I actually am).
     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    You're right, ARSessionOrigin.MakeContentAppearAt will not work for a multiplayer app because two players have two different coordinate spaces. To align two coordinate spaces together, you'll have to use some kind of localization technique, like 'ARKit World Map' or 'ARCore Cloud Anchors.
     
  3. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    The issue is that if you want to "set" the origin, because you have made a custom re-localization solution, there is no way to do it.

    There is a real need for Unity to be able to "set" the origin on an AR device to be able to do spatial computing application.

    It is kind of a "big" missing feature for Unity to support AR "in-the-field" use cases :(
     
  4. kentou1506

    kentou1506

    Joined:
    Oct 1, 2018
    Posts:
    4
    I faced the same issue. MakeContentAppearAt can't call every frame and if it has already called once, won't correctly work as long as it doesn't reset ARSessionOrigin position.
     
    adammpolak likes this.
  5. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    It is additive and drifts, quite poor
     
    TheHeftyCoder likes this.
  6. TheHeftyCoder

    TheHeftyCoder

    Joined:
    Oct 29, 2016
    Posts:
    91
    Is there an explicit reason this can't be set? Performance issues? It probably has to do with not all frameworks providing the same utility. For example, ARCore still has no way to set the world origin, but ARKit does.

    What I find even more annoying though, is that - at least for ARCore - while the device updates the world, there seems to be a chance for the axis of the world to change. So, moving your device forward (i.e in relation to you) may at one point result in the Z coordinate changing and at another point the X coordinate changing, without you having restarted the application or changed the way you move the phone.