Why can only the animations of characters be specified by AnimationPlayer, but not the animations created in AnimatedSprite2D? Because it is very troublesome to create frame animations using AnimationPlayer. However, the AnimationPlayer experiment to create the AnimatedSprite2D channel fails to display animations. When checking the official manual, there is no relevant operation.
The choice to use AnimationPlayer’s I think came down to keeping a linear workflow for visual scripts. AnimatedSprite2D’s use a different resource type so the decision was made to commit to one animation type for the time being and since AnimationPlayer is the more powerful of the two, that is the one AGMaker will support on release.
One workaround is you can setup AnimatedSprite’s, then set them via AnimationPlayer, and use them for the VS anims, but that sort of defeats the purpose as you’re still using an AnimationPlayer.
Another option is to make AnimatedSprite’s and then visible on/off when you need them (I do this with some Sprite2D’s in my Bazelot Quest sample). The issue there is that you lose the automatic direction flipping.
I will say it was requested multiple times during beta to have the option to use from either AnimatedSprite2D or AnimationPlayer. I don’t know if that will happen, but fingers crossed!
Thank you for your reply. Last night, after consulting with my friends, I found a solution. I can achieve the effect of playing the animation edited in AnimatedSprite2D by referencing the method functions of AnimatedSprite2D in AnimationPlayer. However, this is still a bit troublesome. I look forward to the future support for directly editing animations in AnimatedSprite2D.
TLDR: They could work well.
Hello moluoye233, I saw your post and experimented with it with great interest.
Here are my experiment results:
1)In fact, AnimatedSprite2D can be used in AnimationPlayer. Although you can’t add keyframes directly from the key-shaped button on the Inspector like other nodes, we can still add keyframes using the plus sign button in the upper left corner.
2)When the keyframe track does not yet contain the animation property, there seems to be no preview image.
However, once the animation property is added, we can see the image preview on the timeline in the animation editor.
Although it’s a bit troublesome when editing the frame count, it’s a feasible solution after all.
Additionally, I’ve already tried it on GameObject, and everything works perfectly fine.