© Lee Englestone 2021
L. Englestone.NET Developer's Guide to Augmented Reality in iOS https://doi.org/10.1007/978-1-4842-6770-7_14

14. Physics

Lee Englestone1  
(1)
Offerton, UK
 

Another amazing thing that SceneKit provides us with right out of the box that we can use in our Augmented Reality experiences is a physics engine. This means that we can give the items we place in our scenes the ability to interact with each other as you would expect if they were real objects.

We can do this by setting the SCNNode.PhysicsBody property on our SCNNodes.

Giving an Item a Rigid Structure

We can give our nodes some virtual substance beyond a visual appearance so that things can collide with it as if it were solid as shown in Listing 14-1.

We set our nodes’ physics ...

Get .NET Developer's Guide to Augmented Reality in iOS: Building Immersive Apps Using Xamarin, ARKit, and C# 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.