Creating dynamic cameras with Cinemachine
Cameras are a very important subject in video games. They allow the player to see their surroundings to make decisions based on what they see. The game designer usually defines how it behaves to get the exact gameplay experience they want, and that’s no easy task. A lot of behaviors must be layered to get the exact feeling. Also, for cutscenes, it is important to control the path that the camera will be traversing during it and where the camera is looking to focus the action during those constantly moving scenes.
In this chapter, we will use the Cinemachine
package to create both the dynamic cameras that will follow the player’s movements, which we will code in Part 3, and also, the cameras to be used during cutscenes.
In this section, we will examine the following Cinemachine concepts:
- Creating camera behaviors
- Creating dolly tracks
Let’s start by discussing how to create a Cinemachine...