Why isn't my animation looping in-game?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By saricden

So I’ve added two meshes (imported from Blender) with rigging and a single nonlinear animation built in. The AnimationPlayer node has detected the animation, and I have set it to loop (using the UI button that looks like a refresh).

I then have an AnimationTree which I’ve set the Tree Root as an AnimationNodeStateMachine, I’ve added the single nonlinear animation as a single node in the state machine, and have set it to autoplay.

In the Godot editor the animation loops exactly how I want, when viewing it in any scene, however when I play the project, it plays once then stops.

Does anyone know why this is and how I can get it to loop continuously?

Isn’t there an option in blender to set it looping instead? Maybe it overrides the godot’s loop flag.

Maveyyl | 2021-05-11 21:32

:bust_in_silhouette: Reply From: Shargon

So I had this problem to and found out that -loop needs be added to the end of animation’s name in blender. Be aware that if you already Pushed Down the animation with the incorrect name, the rename function won’t work. You will need to re-push the animation with the correct name.