Merge pull request #35966 from muiroc/anim_node_blend_ignored_bug

Use the blend parameter passed to blend_animation
This commit is contained in:
Rémi Verschelde 2021-02-04 12:22:24 +01:00 committed by GitHub
commit 1d1310f3d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -820,6 +820,7 @@ void AnimationTree::_process_graph(float p_delta) {
Ref<Animation> a = as.animation;
float time = as.time;
float delta = as.delta;
float weight = as.blend;
bool seeked = as.seeked;
for (int i = 0; i < a->get_track_count(); i++) {
@ -839,7 +840,7 @@ void AnimationTree::_process_graph(float p_delta) {
ERR_CONTINUE(blend_idx < 0 || blend_idx >= state.track_count);
float blend = (*as.track_blends)[blend_idx];
float blend = (*as.track_blends)[blend_idx] * weight;
if (blend < CMP_EPSILON) {
continue; //nothing to blend