Merge pull request #60774 from TokageItLab/root-seek-mode

Fixed broken root motion calculation in internal process of `AnimationBlendTree` such as `NodeOneShot`
This commit is contained in:
Rémi Verschelde 2022-05-18 15:24:21 +02:00 committed by GitHub
commit 5b3d596285
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 155 additions and 148 deletions

View file

@ -1338,7 +1338,7 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
float pos = cpos + step_off * anim->get_step();
bool valid = anim->get_loop_mode() != Animation::LoopMode::LOOP_NONE || (pos >= 0 && pos <= anim->get_length());
bool valid = anim->get_loop_mode() != Animation::LOOP_NONE || (pos >= 0 && pos <= anim->get_length());
onion.captures_valid.write[cidx] = valid;
if (valid) {
player->seek(pos, true);