-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NavigationPolygon: Unable to make polygons from outlines when a vertex is used twice #38204
Comments
I don't know if this is related, but I got a problem when adding the following red polys as outlines: Whereas these would work just fine I'm attaching below the project that adds the white polygon as an outline, then subtracts the blue poly from the red one and adds it as an outline then by calling make_polygons_from_outlines() we get the error
|
From my testing, this does not seem to be limited to a vertex being used twice (unless there is a bit of rounding goin on under the hood). In my tests, when outlines overlap (point inside another polygon) or intersect (like two rectangles forming a plush shape), you will also receive this error. It seems likely that Edit: adding engine version for reference: |
Issue seems to persist as of version 4.0 alpha 11. Very annoying when trying to do custom navpolys based on tilemap colliders :/ |
2D navigation polygons create Navigationmesh resources from outlines specifically and outlines cannot cross or overlap, ever. What ppl are trying to do here with the navigation polygon draw tool wouldn't work even if the tool would allow it. A single navigation polygon does not merge individual polygons so all those navigation cells would be disconnected. Instead, ppl should use navigationregions / navigationpolygon nodes (for each) cell as those are merged by the NavigationServer. EDIT Multiple NavigationPolygonInstances only merge their navpolygons in 3.5+ if the polygon edges are within Navigation2DServer edge_connection_margin. |
Godot version: 3.2
OS/device including version: Windows 10
Issue description:
When using NavigationPolygon, it's impossible to create polygons from outlines when a vertex is used twice
Steps to reproduce:
Minimal reproduction project:
gd-bug.zip
The text was updated successfully, but these errors were encountered: