Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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.

index

The vertex index to insert at.

vertex

The vertex to insert.

Returns

Type

Description

PolygonGeometryThe new geometry with the inserted vertex.