Topic was automatically imported from the old Question2Answer platform.

Asked By

blool

I’m in a scenario where I want a vector to approach the x and y values of a second vector in a set amount of speed, I’ve tried using move_toward() and linear_interpolate() but both of them slow down more and more the closer it gets to the second vector

move_toward should work, perhaps You made a math mistake in code ?

But it looks like a job for Tween node. It will calculate speed and interpolation, by taking only time and values.

If You are talking about position vectors, than You can just subtract one from another, get the lenght of result for distance, normalize the result for direction, and calculate constant velocity by yourself. ( result lenght divided by time )