I am having an issue with the attached code. I am trying to slice and avacodo (represented as a Polygon2D) in half using the Geometry2D functions. intersect_polygons seems to be returning the wrong resulting shape.
the second screenshot is at runtime. the top red line (it is actually a line with enough points to make a box shape that extends to the bottom of the screen, you can see the red line at the bottom showing that) is where the cut is supposed to happen. As you can see, it is not preforming the cut in that location.
The third picture is in editor, just showing the bounds of the polygon2D for reference. The UV matches the polygon.
Would greatly appreciate it if anyone has clues as to why its not intersecting on the red line.