Support Forum

RichAI ClearPath?

Hi I want to ask how can I Clear RichAI Path like navMeshAgent.ResetPath?
I found this is RichAI base class but it’s protected and I can’t access it from outside.
Is there a reason to it?
image

You can just call:

richAI.SetPath(null);

1 Like

For some reason it doenst work for me, the agent still remembers the path and after finishing executing custom movement code he comes back to last path.

In Debug the blue line that shows path still remains after setting path to null

image
I don’t know if you can see it but the blue line shows the path before attacking player,
when attack starts I use SetPath(null) but that blue line still remains and after he finish his attack he moves towards it

Hi

Keep in mind that agents by default recalculate their paths regularly. If you want to clear the path and prevent the agent from automatically recalculating a new one, then use:

ai.SetPath(null);
ai.canSearch = false;

Hi, Thank you for reply

I tried that and I also tried ai.isStopped but both doesnt work for some reason. I event tried to setting it null in update but still it doenst work.

I also tried Teleporting it and even after teleporting the he still resumed to his old path when finishing custom movement

Hmmm… I remember there was a bug related to this at some point. It might still be in the released version. You could try to upgrade to the beta and see if that resolves it. See A* Pathfinding Project

Hi, I’m on Latest beta and it still happens unfortunately :frowning: