Have your 2D Camera Follow the Player in Godot 4 in One Minute
A quick way to track a top-down 2D object!
2 min readJun 14, 2024
So — ever wondered how you can create a 2D camera that follows your player for a top-view Godot game and stops at the edge of the level?
🚀 Support me on Patreon for exclusive rewards!
⚙️ Get the code & assets on Github!
Watch it in video version:
To do that, you just need to make sure you have a Camera2D node in your scene that is a child of the node you want to follow (here, for example, my CharacterBody2D player):
Then, you can zoom the camera in to better focus the target if you want: