Have the Camera Follow The Player in Unity

Esteban Ibarra
2 min readJun 23, 2021

--

A very simple method of having your camera follow the player is to simply make it a child of the player!

Unity also offers a built in robust Camera tool called Cinemachine, we’ll give it a try here! First, you must install the package via the packages menu.

Now that it’s installed, you’ll see Cinemachine as a menu option. Go ahead and open it up and create a new virtual camera. The main camera is now the main brain and will control this and other virtual cameras, but for now, one camera will do. If you look in the camera options, there’s an option to follow an object, let’s drag our player into it.

Even staying with the default options, we already have an extremely smooth camera following our player with minimal effort! This works very well for our purposes for now, so we’ll leave it at this. Tomorrow we’ll go into moving platforms!

--

--

Esteban Ibarra
Esteban Ibarra

Written by Esteban Ibarra

cartoonist, game artist, and wanabe gamedev.

No responses yet