2D Cameras Using Virtual Cameras

Cinemachine also has a 2D camera for 2D games! Right click Cinemachine -> Create 2D Camera and rename the Virtual camera that you created to 2D camera. Then to view the world completely in 2D, go to the Main camera and change the Projection from Perspective to Orthographic.

Drag the player into the Follow field under the 2D camera. Change the Aim mode to Hard Look At. You may need to adjust the Lookahead Time value under Body because the camera may be trailing behind the player too much. Fine tune your camera's settings to get the desired effect!

Perhaps you're making a platformer and you want your camera to be confined to a specific region of your map. You can create an object like a cube and then on your camera, add the Cinemachine Confiner extension and drag in your confining object.

Previous
Previous

Cinemachine Brain - What is it?

Next
Next

Over-The-Shoulder Aiming in Unity