Smooth AI and OnPathComplete call?


I have been following the docs and reading lots of questions on the forum, but at this point I am not sure if they are depricated (I am using the latest version from the website).

So does the richAI component smooth the path or it still needs FunnelModifier?

Also the SetDestination is a separate script now and I am wondering how to deal with it. As far as I understand I should have:

-Gameobject that holds - Seeker, RichAi + a script similar to set destination that sets the next target, but then how do we use the OnPathComplete event and stop the AI / do something else when we’ve reached the goal? It keeps pushing the player no matter EndReachDestination is 0.5 or 20.

In your example the onPathComplete is used in the seeker that starts the path but now we start the path using - ai.destination = target.position;

Edit : I found a checkbox to use the Funnel Simplification on the rich ai, also I think that checking
_richAi.reachedEndOfPath is doing what I was looking for.

RichAI has its own internal funnel modifier, it does not require that component.

The AIDestinationSetter script is just a simple example script that one can use to easily follow a Transform component instead of setting the destination using script.
You can otherwise set the destination from a script using ai.destination = somePoint without using the AIDestinationSetter script.

Use the ai.reachedEndOfPath property instead.

Note that OnPathComplete is a callback for when the path calculation has completed, not for when the AI has reached the end of the path.

Hopefully that answered all of your questions?