Here is code:
void AAI_Customer::MoveToWaypoints()
{
AAI_CustomerController* AI_CustomerController = Cast<AAI_CustomerController>(GetController());
if (AI_CustomerController) {
if (CurrentWaypoint <= Waypoints.Num()) {
for (AActor* Waypoint : Waypoints)
{
AWaypoint* WaypointItr = Cast<AWaypoint>(Waypoint);
if (WaypointItr)
{
if (WaypointItr->GetWaypointOrder() == CurrentWaypoint) {
AI_CustomerController->MoveToActor(WaypointItr, 20.f, false);
CurrentWaypoint++;
break;
}
}
}
}
}
}
I think i must write here something to check is point accessible or not.
Here is exception:
Unhandled Exception: EXCEPTION_STACK_OVERFLOW
UnrealEditor_Navmesh
UnrealEditor_NavigationSystem
UnrealEditor_NavigationSystem
UnrealEditor_NavigationSystem
UnrealEditor_NavigationSystem
UnrealEditor_AIModule
UnrealEditor_AIModule
UnrealEditor_AIModule