4

I'm trying to loop an idle animation that I have in an AnimationPlayer, but it keeps on only playing once. Is there any way for me to make it loop?

LeoDog896
  • 3,472
  • 1
  • 15
  • 40

2 Answers2

5

You can enable the Animation Looping icon:

A screenshot of the top right corner of the animation player, showcasing a looping blue arrow.

The looping arrows screenshot of the looping arrows in a toggled color is the icon that allows for toggling the looping.

LeoDog896
  • 3,472
  • 1
  • 15
  • 40
4

For Godot 4, to set the animation loop mode use Animation.loop_mode

https://docs.godotengine.org/en/stable/classes/class_animation.html#enum-animation-loopmode

var anim : Animation= $AnimationPlayer.get_animation(anim_name)
anim.loop_mode =(Animation.LOOP_LINEAR)
LeoDog896
  • 3,472
  • 1
  • 15
  • 40
MrSomeone
  • 71
  • 1
  • 11