NavigationAgent2D not pathing around obstacles inside navigation area

Godot Version

4.2

I set up the NavigationAgent2D to follow the player which works fine. The problem is coming up where there are some static colliders around the map within the region of the navigation region.

the NavigationAgent2D is not taking these into account and not trying to path around them, instead it just runs into them. How can I make the NavigationAgent2D “aware” of these extra obstacles within the navigation area? They are randomly generated So I cant simply paint the navigation area around them.

By changing the navigation mesh, e.g. rebaking the NavigatioNRegion2D navigation mesh with the changed objects included.

Maybe I’m missing something but even with the initial bake of the area it doesn’t include the colliders there.

By default the NavigationRegion2D parses its child nodes. You can change that in the NavigationPolygon source geometry properties to e.g. parse nodes by their group name.

That was it, thank you!