diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-21 13:16:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-21 13:16:35 +0200 |
commit | 36a54ffebbab07252b9f689b7753665b6cb3aaf1 (patch) | |
tree | 4eea234c0caf1be7dd8b42c822d3c15893a0d3fa | |
parent | 78eb25a4a87855e8ea5c04b2b6eb72c2b92dfd7e (diff) | |
parent | dbda5b6700a05c2305584638bfa537d9f885adae (diff) |
Merge pull request #27577 from guilhermefelipecgs/continuation_of_27562
Continuation of #27562
-rw-r--r-- | scene/animation/animation_tree.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index 13b8ebe12d..d1d3582c9d 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -891,7 +891,7 @@ void AnimationTree::_process_graph(float p_delta) { t->loc = Vector3(); t->rot = Quat(); t->rot_blend_accum = 0; - t->scale = Vector3(); + t->scale = Vector3(1, 1, 1); } float prev_time = time - delta; @@ -952,11 +952,9 @@ void AnimationTree::_process_graph(float p_delta) { t->loc = loc; t->rot = rot; t->rot_blend_accum = 0; - t->scale = Vector3(); + t->scale = scale; } - scale -= Vector3(1.0, 1.0, 1.0); //helps make it work properly with Add nodes - if (err != OK) continue; @@ -1241,8 +1239,6 @@ void AnimationTree::_process_graph(float p_delta) { Transform xform; xform.origin = t->loc; - t->scale += Vector3(1.0, 1.0, 1.0); //helps make it work properly with Add nodes and root motion - xform.basis.set_quat_scale(t->rot, t->scale); if (t->root_motion) { |