Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Animation Playback Track not Seeking Properly #89736

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scene/animation/animation_mixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ void AnimationMixer::_blend_process(double p_delta, bool p_update_only) {
double at_anim_pos = 0.0;
switch (anim->get_loop_mode()) {
case Animation::LOOP_NONE: {
at_anim_pos = MAX((double)anim->get_length(), time - pos); //seek to end
at_anim_pos = MIN((double)anim->get_length(), time - pos); //seek to end
} break;
case Animation::LOOP_LINEAR: {
at_anim_pos = Math::fposmod(time - pos, (double)anim->get_length()); //seek to loop
Expand Down Expand Up @@ -1658,6 +1658,7 @@ void AnimationMixer::_blend_process(double p_delta, bool p_update_only) {
}
} else {
player2->play(anim_name);
player2->seek(0.0, true);
t->playing = true;
playing_caches.insert(t);
}
Expand Down
Loading