How to create Navigation polygon that will work

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Daniel Lewan
:warning: Old Version Published before Godot 3 was released.

I’m trying to use Tiled import plugin by @vnen to import tilemap into Godot. It seems that Godot can handle multiple layers of tiles with collison (multiple tilemaps) but only one layer of tiles is used as navigation polygon.

I wrote post import script that merge all navigation polygons from tilemaps into one big navigation polygon. It generates polygons correctly but they are not working. It seems that vertices are in correct position but navigation polygons are not closed (they are not filled with blue)

Is there any set of rules how navigation polygons should be connected/created to work?


Here is simpler case: four tiles, each of them have simple navigation polygon that covers whole surface. (Ignore the offset, that’s bug in post-import script I guess)


Here is my post-import script:

Navigation polygons must be children or grandchildren of a Navigation2D node to work.

aozasori | 2017-08-06 23:30

Yeah I know. I guess I should be more precise. I updated the question

Daniel Lewan | 2017-08-08 22:19

:bust_in_silhouette: Reply From: cwookdev

I don’t think navigation polygon support separated shapes. Rather than putting the navigation in one big polygon, try making a new one for each tile. Godot will (should) combine them at runtime.