InsertVertex(PolygonGeometry, int, Vector2)
Insert a vertex into the geometry returning a new geometry with updated normals and centroid.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public static PolygonGeometry InsertVertex(PolygonGeometry geometry, int index, Vector2 vertex)
Parameters
The geometry to adjust.
The vertex index to insert at.
The vertex to insert.
Returns
Type | Description |
|---|---|
| PolygonGeometry | The new geometry with the inserted vertex. |