In 2d gridgraph ,Node Penalty not work when I add FunnelModifier or RaycastModifier To AILerp

Sorry my english is not good :grinning:, * 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 !!!

Hi

In the beta version, the funnel modifier has an option to respect penalties on grid graphs.
You can find the beta here: A* Pathfinding Project

Perfect solution!Thank you!