Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

AR Foundation: Is it possible to have a fixed world position?

Discussion in 'AR' started by YoungRichi, Feb 5, 2020.

  1. YoungRichi

    YoungRichi

    Joined:
    Apr 19, 2018
    Posts:
    14
    Hello all,

    I am doing some experiment with AR. I can't seem to get the "correct" world position of any object.

    I am spawning a point with Raycast. (basically where my camera is pointing at.)

    However, whenever i try to read the positions of the point that i spawn. (point.x , point.y)

    The value is always at (-0.01, 0.01) or something close to (0,0).

    That tells me i am setting the world origin at that point, which is good.

    However, when i instantiate another point (point[1]) very far away. Its position is also (0,0).

    Is it possible to have one fixed world origin? so all my other objects(points) will have a reference to their ACTUAL position?

    I hope my question makes sense. Any comment is appreciated.


     
    Last edited: Feb 5, 2020
  2. Dean2404

    Dean2404

    Joined:
    Jun 30, 2017
    Posts:
    2
    Could you show your current hierarchy setup please? With the AR Session and AR Session Origin objects. Thanks!
     
  3. YoungRichi

    YoungRichi

    Joined:
    Apr 19, 2018
    Posts:
    14
    Hey! i have figured it out. I was checking the wrong position. Silly me :D
     
    Dean2404 likes this.