0 votes

I have a 2D topdown game where my player is moving during turns away from the cam, but in the end of every turn the cam is focusing back on the player. However the movement of the cam while getting back to the player is very snappy - it just jumps from one position to the other. To make the transition smooth i tried this code inside of _process (delta):
$Camera2D.position = lerp($Camera2D.position, $player.position, 0.9)

but still the movement is just snapping from one position to the players position without any transition. I am quiet new to godot and programming in general ... any suggestions?


asked May 14 in Engine by BigBackPack (23 points)

1 Answer

+1 vote

There is a built-in option just for that.

Under the inspector of a camera2D you can find Smoothing.

enter image description here

answered May 14 by The_Black_Chess_King (265 points)

thx a lot! that helped :)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.