Using Cinemachine to Follow the Player

Jordan Evans
Sep 3 · 2 min read

With the game as it currently stands, if we have our camera follow the player around like we had done before with the basic objects, we would run into a small issue:

What is happening is as we turn our player around, we are also rotating our camera around. This creates the issue of the player not really knowing which direction they are travelling in. To solve this, we are going to use our knowledge of Cinemachine and create a camera system that will follow the player around and not cause the issue with the camera.
Once we have added in the Cinemachine asset to out editor, we can create a new virtual camera and look at adjusting it’s perspective to a point that we like:

As for settings within the camera, they can be adjusted to what you like, but if we want to be sure that our camera doesn’t flip on us anytime we move around, we need to make sure that our Binding Mode is set to World Space:

Once all the settings and adjustments of our camera have been made, we can see how it looks within our actual game:

Now that we have a better functioning camera, we can look to use the Cinemachine assets to create a multitude of different ways to create immersion within our game. Whether it be having the screen shake when we push an object onto a switch signifying a door has opened, or adjust our view area to certain aspects when certain conditions have been triggered.
As for how some of these come into play, I will create something for that with the finished game.

Nerd For Tech

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.

Jordan Evans

Written by

Nerd For Tech

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.