diff options
author | Silc 'Tokage' Renew <tokage.it.lab@gmail.com> | 2021-09-11 02:25:47 +0900 |
---|---|---|
committer | Silc 'Tokage' Renew <tokage.it.lab@gmail.com> | 2021-09-11 02:26:40 +0900 |
commit | 02d81664275c6559237216887a9703796ab4fe1a (patch) | |
tree | 2fbb4e9493297285eaf1fdf6b44661de9780bcf5 | |
parent | c30cffe1b0fa1e87c7b28139ee4765851f5d3398 (diff) |
fixed AnimationNodeTransition when xfade time is zero
-rw-r--r-- | scene/animation/animation_blend_tree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index d11387902a..91755b5824 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -718,7 +718,7 @@ double AnimationNodeTransition::process(double p_time, bool p_seek) { } else { // cross-fading from prev to current - float blend = xfade ? (prev_xfading / xfade) : 1; + float blend = xfade == 0 ? 0 : (prev_xfading / xfade); if (!p_seek && switched) { //just switched, seek to start of current |