Godot Version
4.3
Question
I want to make a smooth transition, but I can’t understand why lerp doesn’t work
The code:
Debug:
4.3
I want to make a smooth transition, but I can’t understand why lerp doesn’t work
The code:
Debug:
The values of all arguments that you fed into the lerp
function are not being changed over time, so the result of the function will be the same each frame. You need to make one of these numbers dynamic, e.g. instead of walk_speed
, put current_speed
as a first argument. This way, it will change every frame smoothly interpolating towards the sprint_speed
value.