i'm using Godot 3.51 for a 2D game and I cant get to work the navigation mode in TileMaps. Here is what i`m doing:
I'm generating a map procedurally with sea and land tiles. Thus, I want to generate a navigation mesh the same way. i.e.: land tiles are walkable. Im using autotile, since my land tiles have different forms, like this:
For my navigation mesh im using the Navigation Mode in the TileMap editor, and drawing the navigation poligons there, like this:
My tilemap is child of the Navigation2D node.
The thing is that when I press play, the mesh seems to bake well (I see it with the Debug option "visible Navigation"), but it doesnt work when trying to move the player. Sometimes it moves, but not as expected.
Just to check if I have everything well configured, I created a NavigationPoligonInstance as child of the Navigation2D node (TileMap sibling) and drew there a mesh, while eliminating the Tilemap mesh, and it works as expected. But this is not what i need!, since I need the mesh to be generated procedurally!.
Maybe I'm missing some special configuration? can you give me guys some tips? Thanks!
EDIT: Additional info: I seem to be narrowing the problem. It seems to be something related with scale; When i end generating the map, I scale it to be something more playable (x2). When i do this, the navigation mesh seems to become crazy. When i dont scale, it works just fine!. But it is too small. What do you recomend?
EDIT2: Ok, @Theraot gave me a hint: Scale is only visual. Therefore, instead of scaling the map, I modified the zoom property of the camera and everything is working now. Hope this helps someone in the future.
Ok, @Theraot gave me a hint: It seems that scale is only visual. Therefore, instead of scaling the map, I modified the zoom property of the camera and everything is working now. Hope this helps someone in the future.