> For the complete documentation index, see [llms.txt](https://roxioxx.gitbook.io/unity-cookbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roxioxx.gitbook.io/unity-cookbook/2d/2d-camera-follow-player.md).

# 2D Camera Follow Player

Use Cinemachine.

If you are looking for Cinemachine, install it from the package manager like you did with the input system.

Reference Video: <https://www.youtube.com/watch?v=mWqX8GxeCBk>

{% embed url="<https://www.youtube.com/watch?v=mWqX8GxeCBk>" %}

Steps:

1. Right click in the scene menu -> Cinemachine -> Pixel Camera
2. Drag the player GameObject in the scene into the Camera's "Follow" target

Deadzone width and height refer to the area the player can move around in before the camera moves.
