Hi all
I have a gridgraph in my scene with a script attached to it that called AstarPath.Scan() once every 0.2 seconds. My seeker agents have the Alternative Path modifier attached to them. Everything was working fine and the agents pathed very nicely.
Since my game map has gotten larger, doing a full Scan() was too slow so I’m now calling UpdateGraphs() instead with a bounding box to determine which part of the graph should be updated. However, the Alternative Path modifier causes the following warnings;
“Very high penality applied. Are you sure negative values haven’t overflowed?”
“Penalty values this high could with long paths cause overflows and in some cases infinity loops because of that”
This leads to a stack overflow and the agent’s navigation eventually breaks.
The properties on the Alternative Path script are;
Priority = 2 (I get an error if I leave it at 1)
Penalty = 1000
Random Step = 10
The initial penalty on the GridGraph is set to 1.
The agents navigate fine if I remove their Alternative Path modifier (but it doesn’t look very good).
Any ideas?