소스 검색

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;
 			}
 		}