(3D) How do you make an object smoothly follow another's position but without rotation?

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

Hi Guys, I am looking for a method for a node to smoothly follow another (ie, start with a delay then catch up and ease in at the end) - something similar to interpolate_with, but without rotation. So basically the exact same thing you would achieve with interpolate_with (interpolating the follower’s transform with the target’s) but without the follower rotating itself towards the target.

:bust_in_silhouette: Reply From: Magso

Use lerp with global_transform.origin in _process.

global_transform.origin = lerp(global_transform.origin, targetVector3, delta)