Summary
In this chapter, we saw how to make a 3D game in SceneKit. From making simple geometries to making floors, we created a fully-fledged game with a complete game loop. We added a scene already created in a 3D software package with animation and imported it into SceneKit.
We imported the COLLADA objects into the scene and saw how to access the objects through code. We added an enemy and physics to the scene. We used SceneKit's physics engine to calculate collision and also applied force to hero objects.
Additionally, we also saw how to integrate SpriteKit into SceneKit to display the score and buttons on the scene. We also used SpriteKit's touchBegan
function to detect touches on the screen and created the play and jump buttons.
Parallax scrolling was also added to the scene using planes. Also, we looked at different types of maps, such as diffuse, normal, and specular maps, and the functionality of each. Finally, we added a rain particle system and character animation to the...