You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discussion:
I was going to file this as a bug, but it seems this is by design. So that makes this a discussion now. It seems that for AnimatedSprite2D the animation_finished signal is trigger as SOON as the last frame is displayed. This seems so obviously incorrect to me that I thought it was a bug.
How I think it should work:
It should trigger animation_finished once the last frame has been displayed for the correct amount of time. (IE. The same amount of time that every single other frame of the animation was displayed.)
For instance, if I am showing something at 5 fps. The last frame should be displayed for 1/5th a sec. Then the animation_finished should trigger.
Why I think it should work this way:
The most obvious use case is explosions, or really any animation that at it's completion you want it to remove itself, or change to a different animation. I honestly cannot imagine a use case where you wouldn't want animation_finished to trigger until AFTER the last frame has had it's fair share of display
time.
Steps to reproduce:
Minimal reproduction project:
The text was updated successfully, but these errors were encountered:
Now I know why animation_finished signal is not trigger when animation has only one frame (Godot 2.1)😄
I've also been wondering if this is a bug or work as designed.
I agree that animation_finished should fire after the elapsed length, not immediately upon drawing the final frame. It's easy to know when the last frame is being played in frame_changed but knowing when the animation truly ends is tedious and it feels backwards to receive the signal that the animation is over followed by a frame change.
Additionally, what I think is a fair bug is that if you change animations in animation_finished callback, then frame_changed never fires.
Here is a demonstration of the behavior: 3 AnimatedSprite, one looping, another non-looping and the third non-looping, changing its animation when finished, as described above. You can clearly see order the signals fire, or don't. AnimatedSprite_animationFinished.zip
Godot version:
v3.0.2
OS/device including version:
All
Discussion:
I was going to file this as a bug, but it seems this is by design. So that makes this a discussion now. It seems that for AnimatedSprite2D the animation_finished signal is trigger as SOON as the last frame is displayed. This seems so obviously incorrect to me that I thought it was a bug.
How I think it should work:
It should trigger animation_finished once the last frame has been displayed for the correct amount of time. (IE. The same amount of time that every single other frame of the animation was displayed.)
For instance, if I am showing something at 5 fps. The last frame should be displayed for 1/5th a sec. Then the animation_finished should trigger.
Why I think it should work this way:
The most obvious use case is explosions, or really any animation that at it's completion you want it to remove itself, or change to a different animation. I honestly cannot imagine a use case where you wouldn't want animation_finished to trigger until AFTER the last frame has had it's fair share of display
time.
Steps to reproduce:
Minimal reproduction project:
The text was updated successfully, but these errors were encountered: