Having trouble with MoveToLocation()

Hello everyone,

I’m having an issue with my AI in Unreal Engine where the AI doesn’t navigate around obstacles properly. While using the MoveToLocation function, If the target location is on the other side of an obstacle, the AI doesn’t move to the target location at all. It just stands there and does nothing. However, if the target location is not on the other side of an obstacle, the AI moves just fine

Here is the code for my AI controller:

void ANPCController::ExecuteFindEscapePoint()
{
FVector EscapeLocation = FindEscapePoint();

MoveToLocation(EscapeLocation);

}

I think the code you are showing has no problems, it may be something else… Verify the navmesh is properly created, and the point behind the obstacle is also covered by the navmesh

My bad! The target location was not inside the navmesh.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.