Browse Source

fixed AnimationNodeTransition when xfade time is zero

(cherry picked from commit 02d81664275c6559237216887a9703796ab4fe1a)
Silc 'Tokage' Renew 4 years ago
parent
commit
a95b015968
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/animation/animation_blend_tree.cpp

+ 1 - 1
scene/animation/animation_blend_tree.cpp

@@ -724,7 +724,7 @@ float AnimationNodeTransition::process(float 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