summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-04 12:22:24 +0100
committerGitHub <noreply@github.com>2021-02-04 12:22:24 +0100
commit1d1310f3d7fbde091771ee7bb98bb94e60432696 (patch)
tree8ba5a77577965aa2e309b4e6c02078c2e756c2f5
parent5f8f049ddb1f322d48b35eec27d594d8eb97acd6 (diff)
parent01bd1b33c7a5ba84b043681f55cc3aae34d94942 (diff)
Merge pull request #35966 from muiroc/anim_node_blend_ignored_bug
Use the blend parameter passed to blend_animation
-rw-r--r--scene/animation/animation_tree.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index e6abbc0c7a..54523cc390 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -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