Why does polygon on godot not render the way as how I set it in the editor?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By XenoBoi

I am trying to draw a navigation shape for a tilemap.
I drew a polygon for each tile and ran the scene.
Some points in the polygon are somehow connected.
I tried different methods to create the polygon, all cause some kind of unexpected connections between edges of the polygon.
enter image description here
enter image description here
Please help.

:bust_in_silhouette: Reply From: Gollum

Hello there. I’m not very experienced yet and I still don’t know these things in godot. I think this is because your maps have a sequence at the node. Try to change their order.

:bust_in_silhouette: Reply From: smix8

Mostly everything about the pre Godot 3.5 navigation polygon and TileMap is broken.

What you see is basically the TileMap creating a polygon that only makes sense for rendering but has the vertices placed in the wrong order so the navigation polygon connects them in unexpected ways resulting in the broken navigation mesh that you see.

Update to at least Godot 3.5 that has parts of the TileMap editor fixed or create your navigation polygon with scripts / by hand and replace it on your TileMap data. The TileMap editor in Godot 3.4.4 will only create garbage for everything that is not a square polygon.