Apple’s ARKit has proved wildly popular amongst users as well as developers. Apple recently announced that a range of new ARKit features would be introduced in the Spring Update. Unity have therefore released an update to its own Unity ARKit plugin.
When ARKit was first released, it was capable of accurately recognising horizontal planes such as a table, but not vertical planes such as walls and doors. While this was great for creating virtual table-top environments, it made it tricky to create virtual artwork. The updated version allows developers to detect both horizontal and vertical planes.
The new update can now allow developers to set a more detailed boundary for plane recognition, allowing for more complex structures beyond plane centres and rectangle extents.
One of the most complex features to be added in the ARKIt Plugin 1.5 update is the option to detect specific objects or images, referred to as Markers. This means that an anchor point can be set that remembers the specific size, position and orientation of that marker. The images used for these Markers need to be established by using ARReferenceImage. Further information on this feature can be found in the ARKit documentation.
In previous versions, when users received a phone call, or otherwise set the app using ARKit to the background, it would lose its tracking data, resulting in AR items being out of position upon re-entering the app. The new update allows for world tracking data to remain persistent, as long as the user doesn’t move too far from the original position. This feature is optional, and the original behaviours can be kept if the developer chooses.
Typically with ARKIt apps, the camera is set to infinite focus. With the new update, developers can sleect if they want infinite focus or autofocus using the ARKit camera. A new boolean labelled enableAutoFocus has been made available to allow this to be set.