Area of unwalkable is bigger than bound?can it be equal the bound?

I use
AstarPath.active.UpdateGraphs(guo);//guo is a bound
to update AstarPath.
But the Area that unable to walk place is bigger than the bound.
how to fix this problem?

Anyone knows?
I try a 2d game,and can’t solve it.

Hi

When calling UpdateGraphs(new GraphUpdateObject(bounds)) what it will do is to recalculate that region as if the graph had just been scanned, however if say a collider was added in that region, that collider may affect nodes further away which is likely what you are seeing.

If you want to just mark some nodes in an area as unwalkable you can use

var guo = new GraphUpdateObject(bounds);
guo.updatePhysics = false;
// Make sure walkability is modified
guo.modifyWalkability = true;
// Set the walkability to this value (false for unwalkable, true for walkable)
guo.setWalkability = false;

I try the codes,but still have the problem.
In AstarPath,
I set gridSize = 0.32.
and debugSize = 0.32.(Gizmo draw cube size)
I put a collider which size of 0.32*0.32 in the scene.
and saw a cube in the middle of four grid.
Seems that four grid mark as unwalkable.
but I debug the programs.it has only once break when i set a breakpoint in the function of Apply(GraphNode),which seems be the function that update the nodes’s walkable.

I wanna mark one Grid as unwalkable only.= =

Hi

Do you think you could post a screenshot of the issue?

I want mark one grid unwalkable.but it seems four grid is mark as unwalkable.

Hi

What you look at in the scene view are the connections between the nodes, so that red cube is placed at the center of a single node. It is just making a single node unwalkable in the graph.
Maybe you want to offset your graph by 0.5 nodes?

i wanna collider size is the graph size.
and i put colliders no space of each other.
yeah,i wanna it offset 0.5 nodes.so that it just occupy one grid.(at this time,it occupys four grids in my thought.)

i misunderstanding the connections.
I fix this problem.ths.