-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Geometry2D Union generates invalid Polygon2D/Self-intersection Inconsistency #99745
Comments
Polygon2D is a single outline with no holes that gets converted to a "real" polygon afterward. |
Imo, the visual inconsistency in the editor and engine is still a bug and confusing to the user. If you move only point 8 (emphasis eight) to the right or left, all other points ceteris paribus, it will appear/disappear. In other words, if both are invalid (because v1 and v5 still overlap), then both of them should not be drawn. Further, I feel that if it is kept the same, continues to be treated as "undefined behavior", then it should absolutely be documented in the manual. The other big issue is that nowhere in the manual is self-intersection explained. I feel at the very least a sentence could be added. It would also be nice to just have a few examples in the manual how to fix a self-intersecting polygon. Perhaps also include a function in the engine that allows us to test whether or not a polygon is self-intersecting. Maybe a warning label in editor too, "this polygon is self-intersecting and may not render." Finally, I want to explain how I got here. I was using |
Tested versions
Reproducible in 4.3 and back in 3.x
System information
Godot v4.3.stable - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce RTX 4050 Laptop GPU (NVIDIA; 32.0.15.6070) - Intel(R) Core(TM) Ultra 7 155H (22 Threads)
Issue description
So I've been experimenting with Polygon2D in the editor and managed to create some shapes that will disappear.
I'm not quite sure what the issue is since the polygon does not intersect itself, but if we move any of the points then it will reappear.
Steps to reproduce
Copy these points into a Polygon2D and notice it doesn't render:
Minimal reproduction project (MRP)
I gave the points to the Polygon2D in reproduce steps.
The text was updated successfully, but these errors were encountered: