Hi. I’m new to unreal and currently trying to make a FP Dungeon Crawler game which uses the navmesh to make the player do that smooth transition throught positions.
The problem is that I’ve searched all the internet many ways to get the custom AI controller that I’ve set up in the in my character BP, but fails every time.
The prints show how my AIController is set up in the character BP and the spawn of that class in the game as also of my player.
AMyAIController* myAiController = Cast<AMyAIController>(GetController());
if (myAiController)
{
myAiController->MoveToLocation(nextPosition);
bCanGoToNextPosition = false;
}
else
{
GEngine->AddOnScreenDebugMessage(-1, 1.f, FColor::Green, TEXT("Cast Failed"));
}