I’m having some issues dealing with AI navigation. I have 2 characters in a corridor, each with a DetourCroudAIController. They are each set to move to a location at the opposite end of the corridor, so they must pass through each other. The corridor is 100 units wide, the characters are 10 units wide. There should be PLENTY of room for them to move by eachother.
However, when played, the character on the left makes significant progress towards the right point while the character on the right actually moves in the wrong direction a little bit then stops. I believe what is happening is the right character is unable to find a path to the left point. Instad of moving towards its point, it just tries to use the detour functionality to get out of the way of the left character.
Looking at the navigation, it seems as though there is a wide area around the walls where navigation is not being generated. Actually I’m surprised the characters could move at all because it looks like they start effectively colliding with non-navigable area. In my RecastNavMesh, I lowered the Agent Radius from the default of 35 to 0.
This looks a lot better, as though the characters now actually have a chance of walking by each other. But when I play it, suddenly the Move To Location fails (Return value for the node is “Failed”). For some reason the AI can’t generate a path with this. I have absolutely no idea why. I moved the right character out of the corridor to help try to isolate out the issue. This allowed the return value to be “Request Successful” but the character still didn’t move. I tried different values for the Agent Radius. If I used anything lower than a 31, the character would not move at all. At 31, the characters finally started moving.
I don’t understand this behavior in the slightest. I’m thinking I don’t understand what “Agent Radius” does and maybe there’s another value I should be modifying instead. I would greatly appreciate some insight on this.
Edit: After more Googling, I found people changing this value in Project Settings > Navigation Mesh instead. But even updating it here and rebuilding navigation has had no effect.
Edit 2: Found this post: https://answers.unrealengine.com/que…-in-edito.html And added an Agent in the project settings, set the radius to 4. Deleted and recreated my navmesh. This seemed to solve my issues. I’m not sure why… but it worked. Leaving this here in case it helps others.
Edit 3: There’s still something not working right. Please see this video: 2019 04 14 1807 01 - YouTube
When navigating around corners, it seems the characters are trying to take it tighter than they should. The character only has a capsule component with a radius of 8 and the Agent Radius is also 8. I’m not sure what else to look at for this.