0 votes

Hey everyone.
I'v found strange bahaviour of animation player.
My setup

I have following animation clip. Function Spam() just prints GD.Print output for debugging.

When i call my animation from code (once), it becomes looped.


The only work around i'v found is to stop it from function that is triggered from animation itself with:

What am i doing wrong?

asked Feb 25 in Engine by 255h (23 points)

I tried to reproduce this but it worked fine for me.
Your screenshot shows the looping button unchecked (top right, below the pin), but is it still unchecked in your project?

Iv'v uploaded a test project that reproduces my issue.


And, yes i'v checked the looping option in my animation.

1 Answer

+2 votes
Best answer

In the animation player editor, click on the Animation button, then choose Edit Transitions. You'll see that your FadeOut animation has a transition leading to itself, causing it to loop. If you remove it, it should no longer loop (choose the empty item in the selection box).

answered Feb 26 by Zylann (26,033 points)
selected Feb 27 by 255h

Thank you!
That explains everything!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.