#How to connect navigation polygons?

5 messages · Page 1 of 1 (latest)

frigid stirrup
#

I'm trying to use Godot 4.0.1 navigation, and I need to connect navigation polygons that are not fully connected. I found videos doing that in Godot 3.5 using a "Navigation2D" node, but it seems there's no such node in Godot 4. So how do I do it?
I can't simply draw better polygons because my map is randomly generated using blocks that have their own navigation polygons. I want to leave gaps because without gaps my enemies get stuck on corners.
Maybe there is a way to edit navigation polygons using code to remove bits around corners and walls?

barren helm
#

Godot 4 and Godot 3.5+ connect different NavigationRegion2D / NavigationPolygonInstances either by direct edge overlap or by proximity withing the edge connection margin of the navigation map.

#

the NavigationPolygon by itself is just a resource of data, it does not do anything when it is not used in a region

#

pr https://github.com/godotengine/godot/pull/70724 will add a 2D navigation mesh baking feature that allows to automate this "gap creation" automatically from your scene nodes or you can provide the data for this baking procedual as well.

GitHub

Implements proposal godotengine/godot-proposals#5138
Supersedes #64682 and #70174
The NavigationMeshGenerator singleton is responsible for navigation mesh baking and source geometry parsing from th...