diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index df7044d005f..a89bf8c8c11 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -534,12 +534,19 @@ void AnimationPlayer::seek(double p_time, bool p_update, bool p_update_only) { } } + playback.started = false; // Start has already gone by seeking, delta does not need to be 0 in the internal process. playback.seeked = true; if (p_update) { _process_animation(0, p_update_only); + playback.seeked = false; // If animation was proceeded here, no more seek in internal process. } } +void AnimationPlayer::advance(double p_time) { + playback.started = false; // Start has already gone by advancing, delta does not need to be 0 in the internal process. + AnimationMixer::advance(p_time); +} + bool AnimationPlayer::is_valid() const { return (playback.current.from); } diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h index 51beb672602..0bab586088d 100644 --- a/scene/animation/animation_player.h +++ b/scene/animation/animation_player.h @@ -183,6 +183,8 @@ public: void get_argument_options(const StringName &p_function, int p_idx, List *r_options) const override; + virtual void advance(double p_time) override; + AnimationPlayer(); ~AnimationPlayer(); };