Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Dismiss Notice

How to acquire Device location in ARKit?

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

  1. javebay


    May 22, 2020
    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


    Apr 2, 2017
    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).