Skip to content

Commit 931618b

Browse files
committed
fix(units): switch TaskMoveToDestination to running if defining new target destination
1 parent ad4e4bb commit 931618b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Assets/Scripts/Units/BehaviorTree/Nodes/Task/TaskMoveToDestination.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public override NodeState Evaluate()
2020
if (Vector3.Distance(destination, _manager.agent.destination) > 0.2f)
2121
{
2222
bool canMove = _manager.MoveTo(destination);
23-
_state = canMove ? NodeState.SUCCESS : NodeState.FAILURE;
23+
_state = canMove ? NodeState.RUNNING : NodeState.FAILURE;
2424
return _state;
2525
}
2626

0 commit comments

Comments
 (0)