Skip to content

Follow the player with the camera


This version of the tutorial is deprecated. Please refer to the new platformer tutorial for the completely revised version of the tutorial. The equivalent information to the current tutorial can be found in Part 2.

For now, it's hard to build a large level to explore because the player can quickly go outside of the screen!

Let's add another event to have the camera follow the player. There are multiple ways to achieve this. The simplest is to add an event with no conditions and the action called Center the camera on an object:

The new event looks like this:

You can launch a preview to see that the camera is now centered on the player:

That's all

That was easy right? There are other actions that can be useful. For example, actions can be used to change the coordinates of the camera only on the X or Y axis. It can be useful for platform games where you can't go up/down but just go through the level with a side scrolling.

Next step: add a 'Jump through' platform

It's kind of boring to have a single type of platform. Let's add another with a different image and that is not solid so you can jump on it from below!

➡️ Read the next part of the tutorial here!