Hi folks. I’ve got a 2D project with a crippling navigation issue happening:
I want a zombie character to path towards a rat so that he can attack it. I’ve put a navigation blocker in the way to test his AI. His AI works completely as intended, but since I added the navigation blocker, the whole thing falls to pieces. The zombie cannot properly navigate to the rat as he always gets caught on the corners of the navigation mesh, and appears to get caught outside the mesh, never finishing the movement.
Anyone able to help?
So facts to note:
- The Project Settings > Engine - Navigation System > Agent, Agent Radius is set to 8.
- Increasing or decreasing this number sees the Zombie walking closer or further away from the Navmesh modifier volume, but always getting stuck on the same corner.
- The Zombie has a collision radius of 7.5 (also tested with 8, far smaller, and far larger).
- The Zombie’s pawn movement updates based on the collision radius (as by default). Values seen in the Movement component while playing in-editor indicate this is functioning properly.
- I have tried turning this off and manually setting it. This changes the values properly, but the Zombie still gets stuck on the corner.
- The Nav Mesh bounds volume supports the Agent from the Project Settings (reads the profile by name, and uses the signature yellow color).
- The Zombie is not colliding with objects, other than the floor.
- At no time does the movement fail.
- Speeding up the zombie significantly results in the zombie still getting caught on the corners, but only momentarily before breaking through. He seems very fixated on taking the absolute shortest route there.
- Similarly, if the framerate somehow tanks (happens when I use alt-tab to regain my mouse) the Zombie moves past the corner.
- The problem still occurs if I place a cube down to block navigation, instead of a blocker.
- The Zombie is being told to move via a custom Behavior Tree task. The node is “Move to Location or Actor”, and is using pathfinding, “LockAILogic”, and “Use Continuos [sic] Goal Tracking”.
- “Accept Partial Pathing” is set to default, and the AI behaves the exact same if “Accept Partial Pathing” is set to false.
- Bumping the Zombie into the nav-blocker using my in-game mechanics allows it to walk through the nav-blocking volume and properly finish its route. Bumping the Zombie back around a corner will cause him to get stuck on that corner again.
- Navigation has been rebuilt several times.
- The Zombie instance has been deleted and placed back several times.
- The Nav Mesh has been deleted and placed back several times.
- Unreal has been restarted at least twice.
Images
Level:
Result:
Project Settings:
In-Game Pawn Movement Settings: