How do I get an npc AI to move around pillars instead of walking into them?

Or perhaps simply stop walking after hitting a wall? Currently when an npc walks into a pillar, it just keeps trying to walk through it instead of stopping or trying to find an alternate path around it. I don’t really know how to expand on what I have so far. I’ve tried to set the Agent Radius in the NavigationMesh Project settings to the radius of my npc, but that doesn’t seem to be doing much. Perhaps it’s something I have to do in blueprints?

any hints? im unable to come up with the right keywords to solve this issue. With my limited BP knowledge, There is 1 workaround I thought of, but it isn’t elegant or efficient, i guess. basically add a sphere collision (that is ever so slightly bigger than the base collision) to the npc that ignores everything, except it overlaps dynamic or static meshes. then whenever that sphere collision overlaps, i hook up a stop movement immediately node, maybe some variables, and then immediately to the AI moveto node.

Though that is kind of faking it, as it is not really calculating a route to go to the original destination.

Does your pillar affect navmesh? It is possible that AI thinks there are no obstacles on his way and goes straight.
You can visualize your navmesh by pressing P. You should see a green overlay on top of walkable areas, and your pillars shouldn’t have green under them.

There’s a navmesh encompassing it, but not a navmesh for each pillar. Does this count?

hey all, still haven’t solved this issue legitly. however i did do a on component hit on the base collision sphere instead of making a new sphere to do an overlap, so it’s just a bandaid fix. Now it just has the exact movement ai of a Rhoomba vacum cleaner, but that’s not exactly what I’m after. it doesn’t know how to acknowledge pillars and go around them to reach a destination. Have I run into a limitation of the engine, or is there a way to solve this?

AI is pretty complicated but check the Project Settings. I think there was a setting there that let you define what AI are affected by certain Nav Meshes. Or at least that was there a while back when I was playing with AI for the first time. Other than that, I’d check that your Blackboards are setup right and that your AI character is set to use the nav mesh, etc. It’s always something stupid and tiny that you forgot about or didn’t know you needed to set. Hope that helps at least a little.

Hey! I ran in the same problem, what you gonna do is the following:
1: Go to project settings in the edit tab at the top left corner
2: in settings go to all settings or Engine - Ai System - Movement
3: type in the search bar “acceptance radius”

That is the radius used to determine whether ai can “cut through” path or not

1 Like

Hey all. I dont know does any of you solve this problem, so i just tell answer for future people who came here for it.

Set option “Observed Paths Tick Interval” to value bigger than 0 in RecastNavMesh your level.

Now why it is happen. This option controlls how often path your npc will updating, by default its -1 so doesnt update, thats why if you make AiMoveTo in begin play to static object it will get to it using path and at least navigation) but doesnt use navigation when target actor is moving (npc can literaly walk off navigation volume on straight way to destination)