AnimationPlayer backwards with double speed?

Version

4.2.2

Question

Is it possible to play an animation backwards at double speed with an AnimationPlayer?

Try setting the speed scale of the animation player to -2

Danke Spaten! :wink:
Ich probiere es später :+1:

$AnimationPlayer_Test.speed_scale = -2
$AnimationPlayer_Test.play(“animation_test”)

Unfortunately, it does not work. The animation is simply faded out and is not played backwards. I have also tried -1.5.

With this variant, the animation is also not played backwards, but simply faded out:

$AnimationPlayer_Test.speed_scale = 2
$AnimationPlayer_Test.play_backwards(“animation_test”)

If I leave out speed_scale, it does not work at double speed…

I think the problem is when you use the negative number method, your animation is automatically finished since the end is now the beginning of the animation, unless its looped-> you would have to set current_animation_position to the final frame of the animation, then it should work.

EDIT:
Just realised you cant change this property

final solution(hopefully):

void play ( StringName name="", float custom_blend=-1, float custom_speed=1.0, bool from_end=false )

this is the play function in the animation player. call your animation like this:

animationPlayer.play("animation", -1, -2.0, true)

EDIT: theres also a play_backwards method, but you cant change the speed

Thank you very much! I will try it out tomorrow.

It hasn’t quite worked out that way yet. The problem is that my animation was back at the beginning after the first playback. So there were problems when playing backwards. I have now been able to solve it as follows:

$AnimationPlayer_Test.seek(3.1,true)
$AnimationPlayer_Test.play(“animation_test”, -1, -2.5, true)

1 Like