Seeker path curves through navmesh cut un-walkable area

Hello,

Unity 2019.4.4f1
A* ver 4.2.8

I have a Seeker component on my AI that is following a fairly narrow path to a target position partially blocked by a barrel that has a navmesh cut script on it. I’m using AreaGraphs generated from a mesh which work just fine without the navmesh cut components factored in.

The problem is that I’m seeing the path sometimes curve across the corner of the cut area as seen below:

While I can probably add some sort of fuzzy logic to account for this, I’d rather be able to fully rely upon the Astar framework to only provide a path that is within the walk-able area. I’ve searched through your forum and noticed you mentioned adding a Raycast Modifier component and enabling “use graph raycasting”, however this did not resolve the issue.

Is this a bug and if so is there any chance you can fix it in the near future?

Thanks,
Todd

Hi

It looks like you are using a SimpleSmoothModifier with quite a lot of smoothing. On navmesh graphs I usually recommend only the funnel modifier and nothing else (or in case of the RichAI movement script which has its own built-in funnel modifier: no modifiers at all).

Wow, thanks for the fastest response in a forum ever! It appears you are correct, I removed the Simple Smooth components and added the Funnel component instead, here is the result.

Thank you!

Actually one more question on this if you don’t mind. Based on the way I’ve laid out my navmeshes thus far, I’d prefer the paths stayed away from the very edge of the navmesh polygons, preferably more near the centroid, which was more like the result I was achieving using Simple Smooth. Is there a setting I need to change to get the Funnel component to calculate a path across centroids of the polygoins?