A* Pathfinding Project

Agent repathing to previous corner after it has been passed


I’ve put this under Recast as I’m using a Recast graph. I also posted it before but it didn’t get a reply for one reason or another, so I’ll post again and try to explain the issue.

As shown in the GIF the agent passes their nearest steeringTarget/ corner and a few frames later the path goes to the previous corner again. The Repath Rate is set to 1 in this example.

I thought the issue could have been to do with the navmesh, as there are a lot of irregualar shapes in the scene, however, I exported the mesh to Blender and it’s flat/ as expected. I also thought it could be the funnel modifier in RichAI component but I turned that off and noticed the issue again.


It’s a strange issue and I’m really not sure what it could be. I’ve been fiddling with settings for a few months now to get the best feel. I also can’t remember when the issue cropped up/ after which change…

It is mitigated slightly if I turn on SlowWhenNotFacingTarget but the agent animations don’t look their best and realism is incrediably important in this project.

I’m thinking now it could be something to do with the Seeker so i’ll have a fiddle with that next.

Any help or advice would be much appreciated as it’s making my agents look like they’re slightly mad.



Could you post a bit more information about this issue.
A picture of your graph.
Are you using any modifiers

Thank you


Hi, thanks for the reply. I’m just converting the Recast to a NavMesh. Going to retopologise it in ZBrush as it’s a bit of a polygon soup at the moment. Once I’ve imported it back into the project I’ll test it again. :slightly_smiling_face:

edit: realise that may have come across rude. The polygon soup is just a product of having a complex scene layout.



So I sorted the Recast mesh and re-imported it into the project as Navmesh… The same issue is still coming up so I’ll send over some more info. Maybe, there’s something I’m missing…

A* Pathfinding Project v.4.2.8
Unity 2018.4.8f1

Another .gif of the issue

Navmesh Setup

Agent Setup

Let me know if you need any more info.


Thanks for getting back to us with the info.
I can’t see anything really wrong here. So you might have to wait till Aron gets back and can help you out.

I’d try putting your agent in the Recast or Navmesh example scenes, and see if it works there.
Second you might also be interested in using the RichAI movement script as it’s supposed to work better for Recast and Navmesh graphs.


Hey, cheers for the reply.

PathAI is extending RichAI just with a couple of additions. I’ve tried it on a 5x5 plane using a Recast and I didn’t see the issue either.

It almost looks like the distance from the waypoint isn’t reached despite how close they get. However, when it passes the corner point it repaths using the previous corner. I also lowered the Hueristic scale thinking it could be the quality of the search but that hasn’t helped :confused:

I’m at a bit of a loss really. Thanks though.


Just adding some more findings into the pot… As to be expected the FindNextCorner() is recalculating the next corners. In the gif the red is nextCorner[0] and cyan is nextCorner[1]…




Do you think you could disable the RVOController and see if that changes anything?
Are you using root motion by any chance?



Disabling the RVOController doesn’t change anything unfortunatly and I’m using a slightly modified version of the MecanimBridge script. The only difference is that I’m setting the deltaPos.y to the NearestNode using GetNearest() and the following…