We have an old c++ class that uses nav mesh to move the our ai character. Now we want it to work without nav mesh and logically this should be done by only setting the bUsePathfinding= false in MoveToLocation() function. I did it and now our ai character works outside of the bound of a nav mesh. but it still need one nav mesh to exist in the map no matter where and what size.
I also checked our code to see if there is any place that we check for exitance of nav mesh but i didn’t find any thing any where. I also removed most of our ai manager codes and made our code simple like below and added a log to print the return value of MoveToLocaiton(). It always prints “RequestSuccessful” but still not moving when there is no nav mesh in the map.
Do you have any idea?
Do you know any where that existence of nav mesh being checked or some thing like that?
FVector Destination = {-1316.000000, 193.000000, 210.000000};
EPathFollowingRequestResult::Type Result;
Result = MyAIController->MoveToLocation(Destination, -1, false, false, false, false, NULL, false);
switch (Result)
{
case EPathFollowingRequestResult::Type::Failed:
UE_LOG(LogTemp, Error, TEXT("Movement: Failed"));
break;
case EPathFollowingRequestResult::Type::AlreadyAtGoal:
UE_LOG(LogTemp, Error, TEXT("Movement: AlreadyAtGoal"));
break;
case EPathFollowingRequestResult::Type::RequestSuccessful:
UE_LOG(LogTemp, Error, TEXT("Movement: RequestSuccessful"));
break;
default:
UE_LOG(LogTemp, Error, TEXT("Movement: None!"));
break;
}