Hi, I’m having trouble with AstarPath.active.UpdateGraphs(Bounds), as my Grid Graph is consistently updating for collisions outside of the specified bounds.
Here I have two tiles with a ‘wall’ template on them. The bottom wall will be built first.
As you can see, the bounds of the BoxCollider2D are exactly the size of 1 in game tile. The grid graphs is configured to scan for nodes in the center of each tile.
Once the “Construction” task for the bottom wall is complete, I call the following code
public virtual void OnConstructionComplete()
{
isConstructed = true;
AstarPath.active.UpdateGraphs(GetComponent<BoxCollider2D>().bounds);
}
However, the graph detects the colliders of both the constructed bottom wall (correct), and the non-constructed adjacent wall.
The adjacent wall should be well outside the specified bounds and I am using a fairly small circle to detect collisions.
Do you have any idea what I might be doing wrong? Thanks