Receiving paths

Hello I’m using a* pathfinding pro latest beta with jobs.
Configuration: recast graph, heuristics euclidean enabled.
In editor everything works like a charm, but on mobile devices some of agents have a strange behavior.
After receiving destination, some of agents begin stuck, as they don’t receive path callbacks. They have non zero velocity, so they animated as they moved slowly, but not changing their positions.
After some of other agents (who moved normally) are being despawned (deactivated through lean pool asset) they begins to move one-by-one towards destination. Here video of this behavior:

I thought it was performance problem, but error occurs at iPhone 13 pro, such can’t said a slow device.
Problem is that error appears only on devices so debugging is very troubled.

Hi

Do you have AIPath → Stop When Destination Crowded enabled? This option is kinda buggy at the moment in the beta and can cause this behavior.

No. It turned off. (Cause destination usually really crowded & they stops most of time )
Also. It controlled by rich ai. If needed

Hello Aron. It seemed to me I could reproduce tihs error at editor. and found, that sometimes
Method UpdateTarget at RichAI returns requiresRepath true, when canSearch is false, wich causes position not to update. and giving zero velocity on valid path.
Also I found, that RichAI uses funnel simplification no matter I turned it on or not. It returns not null Rich funnel on turned off checkbox funnelSimplification & no FunnelModifier component on it.
Does it right behavior? What should I do? Using of AIPath can solve this problem?

Hi

That can happen if the graph has been changed since the agent had its path calculated. If any nodes in the agent’s path have been destroyed, it will not be able to follow that path anymore. In normal cases it would try to recalculate the path immediately, but if you have canSearch set to false it will not be able to do this. Is there are a reason you can canSearch set to false.

Yes. The RichAI component has its own internal funnel modifier which it runs every frame for movement calculations.