瀏覽代碼

Fixed AnimationTreeStateMachine transition priority (last transition was always chosen instead of least cost)

Fixes #31132
PouleyKetchoupp 6 年之前
父節點
當前提交
aaad50e4d9
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/animation/animation_node_state_machine.cpp

+ 1 - 0
scene/animation/animation_node_state_machine.cpp

@@ -235,6 +235,7 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *p_sta
 
 			if (cost < least_cost) {
 				least_cost_transition = E;
+				least_cost = cost;
 			}
 		}