Clarification on Dynamically Changing Pathfinding Regions

4.3

Hello, i’m experimenting with navigation for the first time, and I wanted to know if this was the intended/most efficient way of achieving my goal. Currently, i’m using a TilemapLayer to bake the polygon for a NavigationRegion2D. I’m doing this because I would like to be able to dynamically add/remove/move a node which may block the path of a unit. The conclusion I reached, is that for a NavigationObstacle to function, I need to rebake the region’s polygon each time? Is that not terribly inefficient in the case that I needed to perform it on each physics update if i’m using RigidBodies as obstacles?

Am I overthinking the performance cost of doing this, or is there a better way to accomplish my goal of being able to dynamically block a NavAgent’s path, and cause them to route accordingly? Thank you!

1 Like

For a NavigationObstacle you dont need to rebake the region each time? Is using one causing you to have to do that? When you enable or disable the Avoidance Enabled bool. It should update the navigation regions without needing to rebake.