Get a Sprite to have Smoothed Movement Similar to the Camera

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ThreeSpark

Hi! What I want to do is have a sprite that follows the player, and has smoothed movement like the camera. It’s going to be the background. Instead of a Parallax background, I want it to simply follow the player similar to how the camera does when it has smoothed movement. Does anyone know how to do this?

:bust_in_silhouette: Reply From: johnygames

You could try the in-built functionlerp() @GDScript — Godot Engine (3.1) documentation in English

It takes the current value and the end value as parameters and it interpolates between them by a factor, which is called weight and is the third parameter of the method.

Is that good enough for what you want?