Strange recast graph generation causing wrong agent pathfinding

  • A* version: 5.4.6
  • Unity version: 6000.3.7f1
    Agent script: AIPath + RVOController

I’m trying to integrate the A* Pathfinding Project Pro with Recast graphs. Here is a screenshot showing the weird path calculation.

When I switch the Debug mode in the graph to ‘Show connections’, I can see some lines which, I think, are used for navigation.

image

I have a plain terrain without any height modifications.

What I tried:

  1. Change rasterize terrains, rasterize colliders and meshes checkboxes.
  2. Change character radius, character height, max step height, max slope.
  3. Change voxel size, Use Tiles mode, Max Border Edge Length, Edge Simplification, Min Region Size, Round Collider Detail. These parameters has affect to connections but they not removed still causing navigation issue

Also my characters have jittering during movement, which makes it feel like the game is running at a low framerate (even though it’s actually around 200 FPS in the editor).

P.S. I have a strong feeling that I’ve just missed some little detail, which makes me feel like a fool, but at this point I have no idea how to fix this movement and make my units move straight to a point when there are no obstacles in front of them.

Hi

For moving on navmesh/recast graphs using the AIPath script, you’ll also need the FunnelModifier attached to the agent, which simplifies the path.

However, I would recommend using the newer FollowerEntity movement script which works out of the box on recast/navmesh graphs and generally has nicer and more robust movement than AIPath.

See Movement scripts - A* Pathfinding Project for a comparison

Thanks for the FunnelModifier, it really helps. However, there is still a problem with jittering while moving.

I know about FollowerEntity, I tried it and it works perfectly, but I have an architectural problem — my game is built on top of another ECS framework called “Morpeh ECS”, so I just don’t want to add another ECS system to my project. That’s why I’m trying not to use the FollowerEntity script. Maybe I’ll write my own movement script that works with Morpeh or just change Morpeh to Unity ECS, but not today.