RichAI ignores paths with ITraversalProvider when using SetPath()


I’m using RichAI agents on a RecastGraphs, which for now works pretty good in my project.

Now, I’m trying to create behaviour, where Agents try to flank Player from behind. I’ve implemented ITraversalProvider that increases Penalty for nodes close and in front of Player.

Here’s the code how I’m setting up path for agent:

var path = ABPath.Construct(npcPos, flankPos); // flankPos is position behind the player
// path traversal which increases traversal cost when node is close to player and in front of them
path.traversalProvider = new AvoidPlayerFrontTraversalProvider(playerPos, npcPos);
ai.SetPath(path); // ai is RichAI instance from GameObject

I’ve noticed that when path is set, RichAI agent calculates path properly (respecting ITraversalProvider), as I can see it in play mode with gizmos drawn. However, despite that, it still prefers to use shortest path possible, completely ignoring path with traversal provider.

Is there a possibility to force RichAI agent to respect this path without some hacks?

I’ve tried also to disable autoRepath, to check if it is not forcing recalculations, but it didn’t help.

After tinkering with some RichAI options, it seems that RichAI indeed respects ITraversalProvider. It’s default “Funnel Simplification” option simplifies paths “too much”, like in my case (pic related):

I’ve disabled Funnel Simplification and RichAI now respects calculated path with ITraversalProvider. I’ll try now to use different Path Modifiers and check which one is best for me.