AI Agent ignoring baked navmesh

grkwasniewski

New member
Hi,

I'm using Agent from the Deathmatch AI demo. I was able to set up my own character with the same behavior tree that is used by the demo Agent. But I can't understand one thing.

I have baked Navmesh and as long as the Agent is only patroling, he sticks (more or less) to the baked navigation. But once he starts to chase the Player, he completely ignores baked navigation. For example, he climbs on stairs that are marked as "Notwalkable". I'm using the "Attack movement" node from the demo, to make the Agent avoid Player attacks. Is there something that I'm missing here? Or maybe AI Agent is ignoring Navmesh by design when he starts attacking the player?
 

Justin

Administrator
Staff member
So Attack Movement is active when the agent is ignoring the navmesh? Attack Movement uses the same pathfinding backend so you should be getting similar results as Patrol. Have you inspected the navmesh path to see if it is pointing to a valid destination? The agent follows the path returned by the navmesh so as long as that is correct you should be ok.
 

grkwasniewski

New member
When the issue happens, Enemy AI NavMeshAgentMovement ability is active, and Attack Movement is returning true. I will try to debug NavMesh itself and then I will post an update here.
 

grkwasniewski

New member
So I did add a simple debug script, that renders a line for the next point on the AI path. It looks like the line render is never showing a navigation point on the stairs, but Agent still walks on them. But when he does, he's not doing the movement in a "smooth" way. He is jittering like he is stuck onto some kind of obstacle.
 

grkwasniewski

New member
After further investigation, it looks like the issue lies in auto-generated navmesh. When I've changed manually the voxel size (tried a few different values) Agent is actually stopping at the edge of the stairs. Thank you for your response, Justin. Closing this one.
 
Top