Search Unity

How to acquire Device location in ARKit?

Discussion in 'AR' started by javebay, May 22, 2020.

  1. javebay

    javebay

    Joined:
    May 22, 2020
    Posts:
    1
    I'm considering the new iPad Pro to develop an app for tracking a device around a room. However, I've read page after page and can't find whether the device XYZ location path (or trajectory) is available or whether they hide that info.

    Thanks for any thoughts. If anyone can direct me towards the right place for that, let me know. I'd like to work on this in Unity, as Matlab and Simulink are more difficult to work in.
     
  2. DreamPower

    DreamPower

    Joined:
    Apr 2, 2017
    Posts:
    103
    When the app first starts up, wherever the device's camera is at that moment, is considered the origin point at (0,0,0) in Unity (meters), with the forward trajectory along the Z axis the direction the camera is pointing. After that the camera's transform position and rotation update as offsets from the origin point as the device is moved, so for example if you move the iPad one meter forward, the camera's location will be reported as (0,0,1), then move half a meter to the right and it'll be (0.5,0,1).