Sorry my english is not good , * I customized the node penalty of each node in the graph, * My AI is perfectly able to avoid big penalty nodes: code like this
var curGraph = AstarPath.active.graphs[2];
curGraph.Scan();
curGraph.GetNodes(node =>
{
var tile = GridManager.Ins.GetTileByWordPos((Vector3)node.position);
if (tile != null)
{
int a = ToolsMgr.GetPenalty(tile);
node.Penalty = (uint)a;
// Debuger.Log("Node penalty:" + node.Penalty);
}
});
But when i add Funnel or RaycastModifier to AI GameObject , All GriphNode Penalty becomes the same number ,So my Ai Cant avoid big penalty nodes(because penalty value is same…), * How can I solve this problem?Thankyou !!!