Texture weght/penalty question

Hi! Some quick question: my game has procedurally generated roads (painted on terrain, not meshes), i’m using dynamic 200x200 GridGraph for navigation, so my question is - is it possible to change weight of nodes depending on road texture? I’ve tried to find something in documentation - with no luck. I’m using A* Pathfinding Project Pro 3.8.1

Hi

Yes, this is possible with the pro version. You can expand the ‘Extra’ foldout in the grid graph settings, there is an option there to take the penalties from a texture. It might be tricky to use the terrain splatmaps directly though as they might not be of the same size as the grid graph.
See https://arongranberg.com/astar/docs/gridgraph.html#textureData

Even without pro you can also do it, but then you need to script it yourself, see https://arongranberg.com/astar/docs/graph-updates.php#direct

Hmm, i don’t see any “Extras” foldout, only “Advanced” in grid graph settings, i’ve already tried to use “Use Texture” penalty there - with no luck, updating the asset to 4.2 Pro gave the same result as 3.8.1 Pro. (Path debug mode with “Penalty” enabled showed no any changes) Perhaps, i’ve described the problem not correctly - the goal is to change nodes preference on road textutes, grid is dynamic (with use of “Procedural Grid Mover” script), so AI can use those nods (where roads textures are) at first turn.