How to scan grid graph to get proper effect

Hello,
I recently discovered a small problem with updating grid graph. I put game object with GUS component next to each other, creating a wall. Whenever unit attacks one game object GUS is reducing penalty. It seems that external connections have reduced penalty (I don’t want that). I’ll present it with screenshots.

This is how it looks when game object is destroyed by units:

This is how it should look (achieved by not spawning one game object):

How this can be achieved? I’m using UpdateGraphs( boxCollider.bounds) where Box Collider’s size is same as GUS “size” ( have same 4 points).

Thank you in advance,
Adam.

Hi

  1. This I think is caused by overlapping bounds. The same node is covered by multiple graph update objects.

  2. If you are reducing penalty, make sure there is a penalty to begin with (A* Inspector -> Graph -> Initial Penalty). Negative penalties will underflow and get huge (which can in some cases screw up pathfinding really bad). A warning is usually logged if this happens though (at least if you are using an up to date version of the system).