用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:polygoncollider2d:polygoncollider2d

PolygonCollider2D 2D多边形碰撞器

class in UnityEngine / Inherits from: Collider2D

Description 描述

Collider for 2D physics representing an arbitrary polygon defined by its vertices.

2D物理碰撞器,表示由顶点列表定义的任意多边形。

See Also: BoxCollider2D, CircleCollider2D, EdgeCollider2D.

Variables 变量

pathCountThe number of paths in the polygon.
多边形的路径数。
pointsCorner points that define the collider's shape in local space.
在局部坐标空间定义该碰撞器形状的角点。

Public Functions 共有函数

CreatePrimitiveCreates as regular primitive polygon with the specified number of sides.
创建规则的指定边数的原始多边形。
GetPathGet a path from the polygon by its index.
通过多边形的索引获取一条路径。
GetTotalPointCountReturn the total number of points in the polygon in all paths.
返回该多边形所有路径顶点的总数。
SetPathDefine a path by its constituent points.
通过组成它的顶点定义一条路径。
script/unityengine/classes/polygoncollider2d/polygoncollider2d.txt · 最后更改: 2016/08/02 05:29 (外部编辑)