Mastering ARKit by Jayven Nhan

Mastering ARKit by Jayven Nhan

Author:Jayven Nhan
Language: eng
Format: epub
ISBN: 9781484278369
Publisher: Apress


Whenever an ARAnchor is added onto the sceneView, renderer(_:didAdd:for:) gets called. Inside renderer(_:didAdd:for:), we make sure that the anchor is an ARPlaneAnchor. When the anchor is an ARPlaneAnchor, ARKit has detected a horizontal plane in the ARSession based on the project’s configurations.

Now, you need to set the delegate ARSCNViewDelegate. Add the following code to setupSceneView():sceneView.delegate = self

The preceding code sets the ARSCNViewDelegate to ViewController. Great, you’re ready to test out the AR experience!

For a more obvious environment-aware audio experience in a 3D space, connect your earphones to your device.

Build and run. Detect a horizontal plane. Upon plane detection, you should be able to find yourself looking at a lion model. You should also be able to hear the sound of a growling lion.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.