Detecting and showing horizontal planes

As we mentioned previously, ARSession is the main element of the AR app. Another essential element of ARKit is ARAnchor, which is the representation of an interesting point in the real world, along with its position and orientation. We can use anchors to place and track virtual elements in the real world that are relative to the camera. When we add those anchors to the session, ARKit optimizes the world-tracking accuracy around that anchor, meaning that we can walk around the virtual objects as if they were placed in the real world.

Apart from adding anchors manually, some ARKit features can automatically add their own special anchors to a session. For example, when we activate the plane detection feature ...

Get Enterprise Augmented Reality Projects 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.