I noticed, that RichAI “looses” it’s pathing capabilities, when I update graph using NavMeshCut and it updates the triangle that is part of a path that the agent has not yet traversed.
Below should visualize the problem pretty clearly:
The RichAI should indeed notice that its path has been invalidated and it should recalculate its path automatically immediately. Which version are you using?
Ok so what I got so far, it turns out AIBase.destination is always (Infinity,Infinity,Infinity), yet the RichAI is navigating just fine. Potentially using different target?
When the path should be recalculated, the destination is checked for Infinities, and it blocks the process.
Is it possible my setup somehow navigates without setting destination field?
If you are using one of the built-in movement scripts (such as RichAI) then you should be setting the ai.destination property instead. Optionally you can call ai.SearchPath when you want to force a recalculation to happen immediately, but usually you should leave that up to the automatic recalculation that the agent does itself.
Generally you would only call Seeker.StartPath if you are writing your own movement script.
I guess it was misunderstanding on my side, it was hard to figure out this error, the pathfinding “worked” with my old approach.
Maybe Seeker component can handle this situation, when it notices the RichAI or other valid controller and just set the destination instead of seeking the path by its own.
Do I actually need the seeker component when I user RichAI?
Nice!
Yeah. It’s just due to historical baggage that your previous approach works. I have kept it that way for backwards compatibility, but I would really like to prevent it.
You need the Seeker component because the RichAI component uses it. The RichAI component will call seeker.StartPath regularly to search for paths.