Use physics in scene

Share on Twitter Share on Facebook Share on LinkedIn

Use physics in scene

Description

We will use physics in the scene. i.e gravity.

To do this we add a 2d horizontal plane to the scene and set PhysicsBody = SCNPhysicsBody.CreateKinematicBody().

Then we add 3d cubes at the location the user touches the screen and make it so they mimic gravity using PhysicsBody = SCNPhysicsBody.CreateDynamicBody().

We can see that the cubes are able to fall off the 2d plane.


Video


Code


Next Step : 3d photo gallery surround

After you have mastered this you should try 3d photo gallery surround