Esteban Ibarra

Aug 3, 2021

1 min read

Creating a camera follow system

We want a camera to follow our player, Unity has us covered with Cinemachine! We’ve covered this before in a previous article, so I’ll be quick, it’s super easy though so don’t worry!

You can install cinemachine via the package manager:

Once installed, create a new camera, Unity now offers a 2D camera so let’s choose that and rename it to CV_FollowCam. There’s a slot that tells the camera what to follow so we’ll drag the Player into that. Finally, we can specify the camera distance via that option. The default 10 is good, but I put in 9.

Now let’s see it in action!

Wow! It’s really looking like a game now!