From 11fc3b8758b7879c0a64a2197a3912266d3ddd95 Mon Sep 17 00:00:00 2001 From: muiroc Date: Thu, 6 Feb 2020 22:40:41 +0100 Subject: [PATCH] Use the blend parameter passed to blend_animation during graph processing (cherry picked from commit 01bd1b33c7a5ba84b043681f55cc3aae34d94942) --- scene/animation/animation_tree.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index 5623de94139..6277db3c5cb 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -852,6 +852,7 @@ void AnimationTree::_process_graph(float p_delta) { Ref 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