You can set the custom_speed argument when calling play.
For example, to play an animation at half speed you do this:
$AnimationPlayer.play("animation_name", -1, 0.5)
Here custom_speed is 0.5 (i.e half speed).
The -1 is telling the AnimationPlayer to use the default blending between animations (these are blending times set in the transitions between animations, by default there is no blending, but you can configure them in the "Edit Transitions" option of the "Animation" menu in he "Animation" panel).
Or if you need more fine control, you can set the playback_process_mode to "Manual" so you can use seek and advance to advance the animation.
Be aware that AnimationPlayer in Godot 4 has a speed_scale property, and in Godot 3 it has a playback_speed, which you can use to make all the animations play faster or slower.
So if you cannot use the play method, you may react to the animation_started signal and set the speed_scale/playback_speed.
I have a couple extra tricks for you:
- You can add a "Call Method Track" to your animation, and use it to set the
speed_scale/playback_speedat the start of the animation. This won't work for animations from an imported scene (e.g. a gltf model), as you cannot modify those, so... - You can make an
AnimationPlayerthat plays animations from anotherAnimationPlayerusing an "Animation Playback Track". So you can have anotherAnimationPlayerwork as a proxy for theAnimationPlayerfrom the imported scene. Sadly this track does not let you set the speed either, but you might combine it with settingspeed_scale/playback_speedfrom a "Call Method Track". With this you won't be able play twomultiple animations of the same animation player at the same time (for that you need anAnimationTree), but it might play twomultiple animations of twomultiple differentAnimationPlayers in sync.
Sadly there is no way to control the playback speed from an AnimationTree. Also be aware that an AnimationTree could play multiple animations at the same time, so setting speed_scale/playback_speed might NOT work as desired.