void UCrowdFollowingComponent::OnPathFinished(EPathFollowingResult::Type Result) { UCrowdManager* CrowdManager = UCrowdManager::GetCurrent(GetWorld()); if (bEnableCrowdSimulation && CrowdManager) { CrowdManager->ClearAgentMoveTarget(this); } Super::OnPathFinished(Result); }
void UCrowdFollowingComponent::AbortMove(const FString& Reason, FAIRequestID RequestID, bool bResetVelocity, bool bSilent, uint8 MessageFlags) { if (bEnableCrowdSimulation && (Status != EPathFollowingStatus::Idle) && RequestID.IsEquivalent(GetCurrentRequestId())) { UCrowdManager* CrowdManager = UCrowdManager::GetCurrent(GetWorld()); if (CrowdManager) { CrowdManager->ClearAgentMoveTarget(this); } } Super::AbortMove(Reason, RequestID, bResetVelocity, bSilent, MessageFlags); }