I just start to use Unreal engine and I got into some issues regarding AI and NavMesh in blueprint.
My goal is to make a AI character go straight forward, and if can’t move (block by a wall, a box, reach the border of the navmesh…) he just do a 180° rotation and go away.
To do that, I tried to use the “AI Move To” with a moving target in from of the character. The target location is refresh every tick (for now) and if the target is not reachable, I change the target to the other side of the character.
My first problem is the navmesh configuration, I changed the cell size, agent radius, … but when I press play, it seems that an other navmesh appears. And the navmesh used by the actor seems to be the wrong one (the small one).
I saw there is also those options in the Project settings, I tried to change them but the problem is still there.
My other problem is I don’t know how to detect that the target is out of the navmesh.
On this picture, the target is the black dot, the cube is not moving anymore but the “Is Valid” method for the path still return true.
How can I get a value that say “The target is out of the navmesh” so I can change my direction.
Thanks a lot.