Chapter 11. Introduction to SceneKit
We will now move from the 2D world to 3D. With SceneKit, we can make 3D games quite easily, especially since the syntax for SceneKit is quite similar to SpriteKit. When we talk about 3D games, it doesn't mean that you get to put on your 3D glasses to make the game. In 2D games, we mostly work with the x and y coordinates. In 3D games, we deal with all three axes: x, y, and z.
Additionally, in 3D games, we have different types of lights that we can use. Also, SceneKit has an inbuilt physics engine that takes care of forces such as gravity and also aids collision detection.
We can also use SpriteKit in SceneKit for GUI and buttons, so that we can add scores and interactivity to the game. There is a lot to cover in this chapter, so let's get started.
The topics covered in this chapter are:
- Creating a Scene with SCNScene
- Adding objects to the scene
- Importing scenes from an external 3D application
- Creating the Hero Class and physics
- Adding an...