Platformer Camera Control

I am using the Center Camera within Limits action on a platformer game. My platformer game needs the camera to follow the player horizontally and vertically. But, every time I jump, the camera moves up and down making the scene look like it is moving up and down. Is there a way to make the scene stay still until the player reaches a certain level on the “y axis”? That way the player can jump and the scene doesn’t move. That’s how all the platformer games work. I’ve tried using lerp without any success.

I think this is what you’re looking for. How to make an uncentered camera | GDevelop 5 tutorial - YouTube


This worked and solved one of my problems. The only issue now is that I also need the Center Camera within limits to work with this. When I get to the bottom of my platformer scene, I can see areas on the left and bottom that I do not want the player to see. Here is an image of it. I don’t want the user to see outside of the gray metal blocks. Any ideas?

Yep, I actually just solved for the same problem for myself.

Basically, take what you’ve done for the lagged camera movement, and apply it using my Metroidvania style camera shown in this example: GDevelop Metroidvania Camera Example by Silver-Streak (Using your object you added for camera movement INSTEAD of the player)

You’ll basically need to start adding “BoundryBox” objects for each “room”, but that should solve your issue.

(And by just solved this, I mean last night. So the timing is crazy fortuitous.)

1 Like

Works as a true platformer should now. Thanks a million!

Glad I could help.

If I actually get off my butt one of these days, I’ll see if I need to clean up that example anymore so they can include it into the main examples site.