Search Unity

How ARCore Unity SDK updates Camera position and rotation?

Discussion in 'ARCore' started by xianggen, Apr 8, 2019.

  1. xianggen

    xianggen

    Joined:
    Jun 14, 2018
    Posts:
    1
    As we known, Google ARCore will track the handset Camera Device Postion and Rotation. In ARCore Unity3D SDK, there is one sampe named HelloAR. In the ARCore Device component, there is one Unity Camera named "First Person Camera", it has position and rotation.

    As my understand, ARCore Unity should get the ARCore Camera Device Position and rotation, then set these two values to First Person Camera very frame.

    But after review the whole codes, I can not find such code.

    Can anyone help me?
    Thanks!
     
  2. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    547
    ARCore uses the Tracked Pose Driver to accomplish this. The tracked pose driver updates the transform of the GameObject it is from the source that you select; in this case, the device's color camera. You can put the Tracked Pose Driver on other GameObjects if you'd like to have their poses updated according to ARCore as well.