From 02d81664275c6559237216887a9703796ab4fe1a Mon Sep 17 00:00:00 2001 From: Silc 'Tokage' Renew Date: Sat, 11 Sep 2021 02:25:47 +0900 Subject: [PATCH] fixed AnimationNodeTransition when xfade time is zero --- scene/animation/animation_blend_tree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index d11387902a6..91755b58243 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