Use the blend parameter passed to blend_animation during graph processing

(cherry picked from commit 01bd1b33c7)
This commit is contained in:
muiroc 2020-02-06 22:40:41 +01:00 committed by Rémi Verschelde
parent ee89da129f
commit 11fc3b8758
1 changed files with 2 additions and 1 deletions

View File

@ -852,6 +852,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++) {
@ -872,7 +873,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