Help with Lerp not moving node

Godot Version

v4.6

Question

I’m trying to get my camera to follow my character smoothly using lerp but the camera doesn’t move at all

If you share code, please wrap it inside three backticks or replace the code in the next block:

cameraPivot.Position.Lerp(Position, CAMERA_RETURN_SPEED);
GD.Print(cameraPivot.Position);
GD.Print(Position);

output:

(0, 1.8, 0)
(-4.2341084, 0.75047016, -13.309873)
(0, 1.8, 0)
(-4.2830906, 0.75047016, -13.377291)
(0, 1.8, 0)
(-4.3320727, 0.75047016, -13.444709)
(0, 1.8, 0)
(-4.381055, 0.75047016, -13.512127)
(0, 1.8, 0)
(-4.430037, 0.75047016, -13.579545)

You need to assign the resulting value back to the property:

cameraPivot.Position = cameraPivot.Position.Lerp(Position, CAMERA_RETURN_SPEED);
1 Like

Thank you, I assumed that because it was called on a member it would auto update like with RotateY. That’ll teach me me to look closer at the function signatures

1 Like