Sidescroller camera examples

I created 3 examples to show how the camera follows the player in x axis.

Event 3 - snap to player, simply synchronize x position of the camera with player
Event 4 - “spring” style, that is farther the player leaves the camera center, faster the camera follows him
You can change that 100 to a smaller value to let the player stay at the center of the screen
Event 5 - “mario” style , if you use this, you need to have Event 1. Basically the camera tries to catch up with you only when you go in the same direction. Unlike Event 4, it doesn’t have the “spring” effect, if you stop, the camera stops as well.

1 Like