The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

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?

Imgur

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)

Imgur

Here is my post-import script:
https://gist.github.com/TeddyDD/a5b9315250b6c9eba314347eb806dfc2

in Engine by (373 points)
edited by

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

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

1 Answer

0 votes

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.

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.