From bbec80ca8a74d01b489f3c7d51ec12b493127e62 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Tue, 6 Aug 2019 23:27:25 +0200 Subject: [PATCH] Fixed AnimationTreeStateMachine transition priority (last transition was always chosen instead of least cost) Fixes #31132 (cherry picked from commit aaad50e4d9b5d9e5d7729e145d6b695ec16d2279) --- scene/animation/animation_node_state_machine.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index 1e3470cd903..22c26f99a33 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -235,6 +235,7 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *sm, c if (cost < least_cost) { least_cost_transition = E; + least_cost = cost; } }