Click or drag to resize

GeometryIntersectPolygons2d Method

Intersects polygon_a with polygon_b and returns an array of intersected polygons. This performs between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs.

The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling IsPolygonClockwise(Vector2).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static Array IntersectPolygons2d(
	Vector2[] polygonA,
	Vector2[] polygonB
)

Parameters

polygonA
Type: GodotVector2

[Missing <param name="polygonA"/> documentation for "M:Godot.Geometry.IntersectPolygons2d(Godot.Vector2[],Godot.Vector2[])"]

polygonB
Type: GodotVector2

[Missing <param name="polygonB"/> documentation for "M:Godot.Geometry.IntersectPolygons2d(Godot.Vector2[],Godot.Vector2[])"]

Return Value

Type: Array

[Missing <returns> documentation for "M:Godot.Geometry.IntersectPolygons2d(Godot.Vector2[],Godot.Vector2[])"]

See Also