Adding an AR camera

Next, we need an AR camera. We can use the default Main Camera already in the scene, but it must be parented by ARRoot.

  1. Select Main Camera from the Hierarchy and drag it to make it a child of ARRoot.
  2. Reset the Main Camera's position to (0, 0, 0) if necessary (Transform gear-icon | Reset).
  3. We want this camera only to be working with objects in Root. Therefore, set its Culling Mask to AR Background 2 so that it matches the layer that Root is in (select Culling Mask | Nothing, then Culling Mast | AR Background 2).
  4. Then, use Add Component to add the AR Camera component to the camera.
You can readily reset the Transform Values by using the gear icon in the upper right of the Transform pane and selecting Reset.

The Hierarchy ...

Get Augmented Reality for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.