Open grunthos-dev opened 6 months ago
It looks like the polygons
property is outright ignored and it treats it as if it was one big polygon.
I tested it a bit, and it seems that Clip Children has nothing to do with the bug, it occurs without it also: As mentioned above, it seems that as of yet there simply isn't implementation for combination of clip children and polygons.
Tested versions
Reproducible in: 4.3-dev5, 4.2.1-stable, 4.1.3-stable
System information
Godot v4.2.2.rc3 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.5152) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 Threads)
Issue description
When using a Polygon2D of multiple parts (using the Polygons array to define them via their point indices), it will correctly mask its children when Clip Children is set to Clip Only. However if you Invert the polygon, the masking fails to give the expected 'opposite' result. It doesn't matter if the boxes are created clockwise or anticlockwise.
I hope this is a legal and valid method of doing this.. I'm using this video as a guide... https://www.youtube.com/watch?v=NvJuW7ruuN0
Steps to reproduce
We need to make a Polygon2D whose points define two separate boxes and use the Polygons array to define them via their indexes 0-3 for one and 4-7 for the other.
Minimal reproduction project (MRP)
PolygonInvertedClippingBug.zip