2.5D Platformer — #12 Cinemachine
Objective: Create a camera to follow the character
This article will demonstrate how to use the Unity Cinemachine to create a camera that follows the character.
Firstly we will need to add the Cinemachine package to the project via the Package Manager.
Next, we will add a Cinemachine Virtual Camera. Once added, notice the new icon on the Main Camera and if you click on the Main Camera, there is a CinemachineBrain component added.
With the Virtual Camera selected, we need to drag the Player into the Follow and Look At settings, set to World Space, and adjust the camera’s viewing angle.
We make the camera look slightly ahead and be a little higher to see more of the platform.
This is the final result.
If you enjoyed reading this article give me a Clap, also if you would like to see more, “Follow” me, so you may be notified of future releases. You may also send me a message if you need any further help.
I am available for your next chart-topping game!