How do I stop DynamicGridObstacle cutting nodes on other floors?

Hi, I have the Layered Grid Graph set that covers multiple floors.
I have objects with the DynamicGridObstacle script attached.

Whenever DoUpdateGraphs() is called, it cuts through the walkable space on every floor above.

How do I prevent the above from happening please?


Could you post a screenshot of this?

Before moving the object:

After moving the object:

Is there a way to change the height of where it is cutting? No colliders on the object extend highter than the table.


Can you show me the grid graph settings?

The second floor shouldn’t be cut if the colliders are small enough.

The distance between floors is approx. 5 on the y axis.

That’s very odd. What happens if you press the ‘Scan’ button in the editor?

When I scan outside of preview its fine, what I’d expect.

When I scan whilst previewing it removes those cut bits from other floors.

What do you mean by previewing?

Playing the game in Unity.

It sounds like you must be removing or disabling the collider of the top floor then

I have to disable the other floors otherwise it will render several floors at the same time (in the way and very expensive)

When you move an object like that the pathfinding system will recalculate the nodes for all floors inside that rectangle. This means the colliders need to still be there. You can disable rendering of the other floors but keep the colliders active.

1 Like

Oh okay I see, thanks, that is likely good practice actually as people will be walking about on un-rendered floors.

1 Like