Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Objects not retaining relative position to camera

Discussion in 'AR' started by MigueldeTejas, Sep 2, 2018.

  1. MigueldeTejas

    MigueldeTejas

    Joined:
    Nov 19, 2016
    Posts:
    2
    Using Unity 2018.1.6f1, AR Foundation 1.0.0-preview.17 and ARKit XR Plugin 1.0.0 preview.14 I have created a simple project containing only the following items:

    Directional Light
    AR Session
    AR Session Origin
    AR Camera
    Plane​

    The plane object is a simple 3D plane that is placed in the bottom right hand corner of the AR camera's viewable area and appears properly in Game mode. When the app is launched on an iOS device, the plane briefly appears in the proper location and then it is moved off screen. It seems as if the plane is not retaining its relative position to the AR Camera.

    Any ideas on what is causing this and what can be done to resolve the problem? I could reposition the plane to account for the shift, but would prefer to understand the underlying problem.

    Mike
     
  2. MigueldeTejas

    MigueldeTejas

    Joined:
    Nov 19, 2016
    Posts:
    2
    Looks like this was caused by a difference in the FOV setting for the AR Camera vs the iPad camera's FOV. On startup the app was able to display the plane based on the AR Camera's initial FOV setting of 60 degrees. After startup, the FOV is adjusted to match the real world camera in the iOS device. In my case, the plane was close enough to the edge of the 60 degree FOV that is was outside of the viewing area after the FOV was adjusted.

    Changing the AR Camera's FOV to 34 degrees closely approximates the iPad camera's FOV and seems to have solved the problem.

    Mike