Is there any form of interrupt system that UE4 utilizes when an AI “reaches” its path finding goal?
I’d prefer to just create a listener thread, than have one thread go through a few thousand AIs checking to see if they’ve reached their goals by doing capsule intersection tests.
Blueprints add themselves as a multicast observer via ReceiveMoveCompleted via AIController
MyObj->AIController->ReceiveMoveCompleted.AddDynamic(MyObj, &UAIAsyncTaskBlueprintProxy::OnMoveCompleted);
AIController hooks directly into the PathFollowingComponent
PathFollowingComponent->OnMoveFinished.AddUObject(this, &AAIController::OnMoveCompleted);
You could override AIController’s OnMoveCompleted or get a reference to the path and register as a listener that way. They both provide EPathFollowingResult for success or failure.