Godot Version
4.1.3 stable
Question
How to enable animation looping via code? I have faced an annoying problem: after full cycle of animation playback, it stops, maybe on the last frame (running character becomes to standing still visually). It solves really eazy, just with Animation Looping
button in AnimationPlayer
.
I want to inplement this setting in my logic (not necessarily exactly the same method). My thoughts was: stop animation at the end and play it again (sucks), queue two animations one after another and clear queue on state exit (I think it also sucks), using signals (that complicated yet). I haven’t tried them, just sugessions.
Animation tree (all nodes are BlendSpace2D
):
Move
animation methods.