-
-
Notifications
You must be signed in to change notification settings - Fork 20.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Godot 4.3.dev4 bug - animation on AnimatedSprite2D not working if frame is present in RESET animation #89163
Comments
I found that disabling "Deterministic" in the AnimationTree seems to be a workaround. Not sure what side effects it may have. |
cc @TokageItLab |
Is it the AnimationPlayer that you want the Animation to eventually play or the AnimationTree? In 4.3, there are several possible combinations:
If you want to use AnimationTree, setting AnimationTree's CallbackModeDiscrete to The default for CallbackModeDiscrete in AnimationTree is This is because there have been many issues in the past where the int value uses Discrete by default, but when trying to blend it in AnimationTree, it cannot be blended, so in AnimationTree which does blending as main purpose, use Also if you means you want to play AnimationPlayer, check to see if MRP's AnimationPlayer not playing is simply due to the AnimationTree being Active. |
Hi, I tested changing CallbackModeDiscrete in the AnimationTree to Based on your comment it seems some changes to help blending animations caused issues for cases like mine where I use an AnimationTree to switch between AnimatedSprite2D animations. I know there's a lot of effort right now in 3D stuff, but I do believe this is a valid use case for 2D games. Please check the example project I uploaded, maybe it's not a valid use case and you could tell me what's the right way to have an AnimationTree to switch between AnimatedSprite2D animations. I still think this should be considered a regression. |
I don't know what state your current project is in, but the case reported as an issue is definitely working correctly with the configuration I described, so this is a documentation issue, not a bug. stm.mp4If you have additional information, send a new MRP or test case. Also, not directly related to this issue, but since there was another Discrete related issue (that is regression), check if that solves your problem #89322. |
Well, your video is showing it not working, I'm expecting the animation to change and also play. Please try out the other scene "scene_correct.tscn". In the video I can see the AnimatedSprite2D animation is changing, but not playing, if you try the other scene you will notice the frames also change. One animation moves between part of the robot's face, the other moves in the upper margin. My apologies I didn't provide some better animation to make it clear. So, just to make sure this time is clear let me explain my use case: In previous versions I was able to have this setup:
Before, when using walking and jumping, even when I was only switching the "animation" property, the sprite frames were also moving, as the AnimatedSprite2D's animations were always playing. Now, in dev4, the walking and jumping animation only show the first frame of the animation. The "frame" property is in the RESET animation because I use it in the Attack animation, and because of that, it seems the blending is forcing it into the other animations, which was not happening in earlier versions. |
@ForestGameDev It seems that there is no animation in the MPR that contains the margin movement, even if it is scene_currect; you need to check that the MRP in the Description is correct and send a new MRP. |
Ah, I understand that AnimatedSprite will not play unless the scene is run. Yep, something may indeed be odd, so I'll look into it. |
Tested versions
System information
Godot v4.3.dev4 - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce GTX 850M (NVIDIA; 31.0.15.3168) - Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz (8 Threads)
Issue description
AnimatedSprite2D animations not playing based on AnimationPlayer setup.
Consider this setup:
I found that, if the AnimationPlayer's "RESET" animation contains the "frame" property of X, then the animations don't play. If you remove the "frame" property then they run fine. Please see the MRP attached.
This used to work in Godot 4.2 and 4.3.dev3, so this is a regression in behavior in 4.3.dev4.
Steps to reproduce
Described above.
Minimal reproduction project (MRP)
BugAnimationPlayer.zip
I included 2 scenes, one where the animations don't play, and one where they play fine. The only difference is one has the "frame" property in the RESET animation, and the other does not.
The text was updated successfully, but these errors were encountered: