Version: 2023.1
LanguageEnglish
  • C#

PhysicsShapeType2D.Polygon

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Use a convex polygon shape to interpret the PhysicsShape2D geometry.

A polygon geometry type is comprised of a minimum of three (triangle) vertices and maximum defined by Physics2D.MaxPolygonShapeVertices in the PhysicsShape2D. The vertices represent a set of consecutive edges where each vertex connects to the next vertex with the last vertex automatically representing an edge connecting to the first vertex resulting in a closed primitive shape. These edges must result in a convex polygon. If this is not the case then the physics system will constrain the polygon to be convex by producing a convex hull. All polygon collision detection uses convex polygons for performance reasons.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961