diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-07-13 10:33:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 10:33:34 +0200 |
commit | f2ad067509865f524497175fca600300dae8b7d8 (patch) | |
tree | ee6b4ab84fa835cd7a1a52760852dfcddb9bd8ba | |
parent | e2b79e9591436df76efbeda8abf93a562f66a02f (diff) | |
parent | bcb1e2b79f51d23ce56e76352b7e18ae2632fe98 (diff) |
Merge pull request #48375 from bowling-allie/discrete-carry-bug
-rw-r--r-- | scene/animation/animation_blend_space_2d.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp index 935ec457aa..0871423fbd 100644 --- a/scene/animation/animation_blend_space_2d.cpp +++ b/scene/animation/animation_blend_space_2d.cpp @@ -532,10 +532,10 @@ float AnimationNodeBlendSpace2D::process(float p_time, bool p_seek) { float from = 0.0; if (blend_mode == BLEND_MODE_DISCRETE_CARRY && closest != -1) { //see how much animation remains - from = blend_node(blend_points[closest].name, blend_points[closest].node, p_time, true, 0.0, FILTER_IGNORE, false) - length_internal; + from = length_internal - blend_node(blend_points[closest].name, blend_points[closest].node, p_time, false, 0.0, FILTER_IGNORE, false); } - mind = blend_node(blend_points[new_closest].name, blend_points[new_closest].node, from, true, 1.0, FILTER_IGNORE, false) + from; + mind = blend_node(blend_points[new_closest].name, blend_points[new_closest].node, from, true, 1.0, FILTER_IGNORE, false); length_internal = from + mind; closest = new_closest; |