Camera Follow

With the Character coded and the level somewhat created, the Camera should now be set to follow the Player.

This tutorial looks at having the Camera set as a child object of the Player (which then becomes the parent). This relationship means that when the Player moves, the Camera does too.

  • If the Player moves right, the Camera moves right.
  • If the Player moves up, the Camera moves up.
  • If the Player spins, the Camera will too.

There are lots of different ways to manage the Camera within Unity, however, this Parent / Child relationship is among the simplest to implement and the most common in 2D Platformer games.

Target

You should be able to make the Camera follow the Player in your game.