mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current upstream master branch
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
||||
.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
|
||||
.. DO NOT EDIT THIS FILE, but the CollisionPolygon2D.xml source instead.
|
||||
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
||||
|
||||
.. _class_CollisionPolygon2D:
|
||||
|
||||
@@ -13,7 +14,7 @@ CollisionPolygon2D
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
Editor-only class for easy editing of collision polygons.
|
||||
Editor-only class for defining a collision polygon in 2D space.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
@@ -39,15 +40,21 @@ Member Functions
|
||||
Member Variables
|
||||
----------------
|
||||
|
||||
- :ref:`int<class_int>` **build_mode**
|
||||
- :ref:`bool<class_bool>` **disabled**
|
||||
- :ref:`bool<class_bool>` **one_way_collision**
|
||||
- :ref:`PoolVector2Array<class_poolvector2array>` **polygon**
|
||||
- :ref:`int<class_int>` **build_mode** - If BUILD_SOLIDS, the polygon and the area within it will have collision. If BUILD_SEGMENTS, only the edges of the polygon will have collision.
|
||||
- :ref:`bool<class_bool>` **disabled** - If true, no collision will be produced.
|
||||
- :ref:`bool<class_bool>` **one_way_collision** - If true, only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects.
|
||||
- :ref:`PoolVector2Array<class_poolvector2array>` **polygon** - Array of vertices which define the polygon.
|
||||
|
||||
Numeric Constants
|
||||
-----------------
|
||||
|
||||
- **BUILD_SOLIDS** = **0**
|
||||
- **BUILD_SEGMENTS** = **1**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in :ref:`CollisionObject2D<class_collisionobject2d>`. This is not accessible from regular code. This class is for editing custom shape polygons.
|
||||
Allows editing a collision polygon's vertices. This class is only available in the editor. It will not appear in the scene tree at runtime. Creates a :ref:`Shape2D<class_shape2d>` for gameplay. Properties modified during gameplay will have no effect.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
Reference in New Issue
Block a user