< I have a simple animation that stops at a certain point: for the AnimationPlayer node, I created a Call Method Track and added an InsertKey - pause(). The animation stops at this point.
Then, I would like the animation to resume playing from that place after clicking the appropriate button. I created a button, connected the pressed signal, and added the AnimationPlayer.play() function.
I can do $animation_player.stop(false) to pause the animation. The false here is actually a reset parameter, as shown in the built-in docs. You then could resume it via $animation_player.play()
Thank’s for the information, but that’s not what I meant. animation_player.stop() - stops the animation and resets it to the beginning, pause() - pauses the animation. That’s an important difference.
In the GODOT documentation, there are imprecise pieces of information:
pause() - Pauses the currently playing animation. The current_animation_position will be kept, and calling play or play_backwards without arguments or with the same animation name.
play() - It does not affect resuming playback that was paused in the middle of an animation.