Creating dynamic cameras with Cinemachine
Cameras are a very important topic 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 they behave 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 throughout, as well as 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 of the dynamic cameras that will follow the player's movements, which we will code in Part 3, as well as 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 controlled...