Making a Smooth Following Camera



35,365 visits, 52,534 views



This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Ok, this tutorial is about making a camera follow the player smoothly.



You need to create your player, I'll not explain it here, you can find in Beginner's Guide how to starting using Construct 2.

Creating the Camera

Ok, after you create your player, create a blank sprite, rename it to "camera", this will be your camera.

It preferable to put the camera close to your character, or when you start the game the camera will move to the character if is too far.

But you can use this position to make a entrance for the game, for example you can put your camera in the sky, and when the game start the camera will move to your player position.


Add a ScrollTo behavior for your camera.

Event Sheet

Create an event Add Event>System>Every Tick and create an action Camera>Set Position

X: lerp(Self.X, Player.X, 0.03)

Y: lerp(Self.Y, Player.Y-150, 0.03)


The magic here is the expression "lerp", when you use it, you need to put 3 values, the first one is the initial position, the second one is the final position, and the third one is the time will take to run between initial and final position.

So Self.X is the current position from the camera, and Player.X is the current position from the player.

The 0.03 can be any number, if you want your camera smoother you can decrease the number or vice versa.

For the Player.Y I inserted a "-150" because your character will be always in the middle of the screen, and in this case was better for the player to be in the bottom of the screen.


  • Order by
Want to leave a comment? Login or Register an account!