I use 2 grid graphs for 2 sets of agents. I want to apply varying amounts of penalties at runtime to one of the graphs so that the agents using that graph avoid dynamically generated dangerous zones, but the second set of agents ignore the penalties since the danger doesn’t apply to them. How can I achieve this?
I’m using the following code:
`int dangerValue = … // Each danger zone calculates its own value
var dangerZoneBounds = new Bounds();
…
var graphUpdate = new GraphUpdateObject(dangerZoneBounds);
graphUpdate.addPenalty = dangerValue;
…
AstarPath.active.UpdateGraphs(graphUpdate);
`