Movement in my game is triggered by a “walking” button, with the character following a path via the PathFollow2D node. Each button press advances the character by a small segment, implemented as follows:
path_2d.progress_ratio += SPEED (SPEED player’s movement speed).
I attempted to improve the animation by introducing a Tween for smooth walking. However, after implementation, the character performs a single movement and then fails to respond to further button presses.
This is the signature of the tween.tween_property function:
The argument where you put in SPEED is the final value the progress_ratio should have. So you have to set that to the incremental value, otherwise you just reset the ratio to the same value everytime.