The idle animation wont play when movement stops

Godot Version

4

Question

the character will stop but the animation continues, how do i fix this?

using exact comparisons == for floats is usually a bad idea, prefer to use velocity.is_equal_approx(Vector2.ZERO). Side note Input.get_vector is already normalized, by normalizing it again you break controller support.

it might work in this case but I think we would need to see more of your script.


Make sure to paste your scripts instead of screen shots

2 Likes