기술 자료

Unity Engine

Unity Engine

Create

Create a Polygon from the specified vertices. The number of vertices must be in the range 3 to PhysicsConstants.MaxPolygonVertices.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

Create(ReadOnlySpan<Vector2>, float)

Create a Polygon from the specified vertices. The number of vertices must be in the range 3 to PhysicsConstants.MaxPolygonVertices.
public static PolygonGeometry Create(ReadOnlySpan<Vector2> vertices, float radius = 0)

Parameters

The vertices to use.

radius

The radius to use.

Returns

Type

Description

PolygonGeometryThe created geometry.

Create(ReadOnlySpan<Vector2>, float, PhysicsTransform)

Create a Polygon from the specified vertices. The number of vertices must be in the range 3 to PhysicsConstants.MaxPolygonVertices.
public static PolygonGeometry Create(ReadOnlySpan<Vector2> vertices, float radius, PhysicsTransform transform)

Parameters

The vertices to use.

radius

The radius to use.

The transform used to specify where the geometry is positioned.

Returns

Type

Description

PolygonGeometryThe created geometry.

Create(ReadOnlySpan<Vector2>, float, Matrix4x4)

Create a Polygon from the specified vertices. The number of vertices must be in the range 3 to PhysicsConstants.MaxPolygonVertices.
public static PolygonGeometry Create(ReadOnlySpan<Vector2> vertices, float radius, Matrix4x4 transform)

Parameters

The vertices to use.

radius

The radius to use.

transform

The transform used to specify where the geometry is positioned.

Returns

Type

Description

PolygonGeometryThe created geometry.

Create(ConvexHull, float)

Create a Polygon from the specified convex hull.
public static PolygonGeometry Create(ref PolygonGeometry.ConvexHull convexHull, float radius)

Parameters

convexHull

The convex hull to create the polygon from.

radius

The radius to use.

Returns

Type

Description

PolygonGeometryThe created geometry.