I think it depends. I do not really do a lot of 2D work in Godot, so I'm not positive, but I think what I wrote below is what will happen with an AnimationPlayer.
If each frame is positioned at 0.07
seconds, and the length of the animation is 0.24
(0.067 * 4) then your frames will be at the following positions if you try to fit them into a length of time 0.24
:
-| Frame 1 : 0.07
-| Frame 2 : 0.14
-| Frame 3 : 0.21
-| Frame 4 : 0.24
Notice how frame 4 has to be cut short to fit the 0.24
time range. If you put Frame 4 at position 0.28
in a AnimationPlayer of length 0.24
, then it will never reach Frame 4 and so will skip it.
If you make the length of your animation player instead to 0.28
, and position all four frames 0.07
length apart, then it should play the animation at almost the correct speed (just a tiny, tiny bit slower than 60 FPS).
I have not used AnimatedSprite, so I have no idea if it is better suited or not.
I know that you can get around this issue if you use GDScript and a Sprite node with a sprite sheet. You just need to use delta
to figure out how much time has passed between each frame. Once 0.067
or more time has passed, you just increase the sprite's frame by one, and loop the sprite's frame back to zero if the frame number is more than the last frame of animation in the Sprite.
Hopefully this helps! :smile: