0 votes

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.

in Engine by (506 points)

1 Answer

0 votes
Best answer

Use lerp with global_transform.origin in _process.

global_transform.origin = lerp(global_transform.origin, targetVector3, delta)
by (3,249 points)
selected by
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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.