Sitemap
CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Make your Godot 2D Camera Follow your Player

Track your 2D avatar — the right way!

3 min readSep 26, 2025

--

Want your camera to smoothly follow the player? Godot makes this super easy with the Camera2D node! By default, it sticks rigidly to the target, but with a few tweaks, you can add smoothing, limits, or even fancy lag effects… and yes: it’s as simple as dropping in a camera in your scene and changing some props to get the right feel :)

Press enter or click to view image in full size

👉 This tutorial uses assets by Kenney

Ok, so: how do we do that?

Well, first, add a Camera2D node to your scene as a child of the node you want to follow — for example your player:

Press enter or click to view image in full size

And then… that’s about it, actually! ’Cause, from that point on, the camera will automatically follow the object in-game, and you don’t need to do anything more 😅

However, this camera movement will be pretty sharp and unnatural, and the camera might even go outside the level bounds. So here are a few extra tricks to go further and improve your “camera follow” mechanic a bit.

  • First, if you want to “block” your camera to the edges of the level, use the Limit section in the…

--

--

CodeX
CodeX

Published in CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Mina Pêcheux
Mina Pêcheux

Written by Mina Pêcheux

I’m a freelance full-stack web & game developer. I’m passionate about topics like CGI, music, data science and more! Find me at: https://minapecheux.com :)

No responses yet