Allow AnimationNodes to restart when transitioning to the same state

This commit is contained in:
Silc Renew
2023-01-19 03:10:59 +09:00
parent 8bfaf098c7
commit e480262c53
10 changed files with 175 additions and 72 deletions
@@ -236,7 +236,7 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *p_sta
path.clear(); //a new one will be needed
if (current == p_travel) {
return true; //nothing to do
return false; // Will teleport oneself (restart).
}
Vector2 current_pos = p_state_machine->states[current].position;