mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
79 lines
3.8 KiB
ReStructuredText
79 lines
3.8 KiB
ReStructuredText
.. 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.
|
|
|
|
.. _class_CollisionShape2D:
|
|
|
|
CollisionShape2D
|
|
================
|
|
|
|
**Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Editor-only class for easy editing of shapes.
|
|
|
|
Member Functions
|
|
----------------
|
|
|
|
+------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Object<class_object>` | :ref:`get_shape<class_CollisionShape2D_get_shape>` **(** **)** const |
|
|
+------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_disabled<class_CollisionShape2D_is_disabled>` **(** **)** const |
|
|
+------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_one_way_collision_enabled<class_CollisionShape2D_is_one_way_collision_enabled>` **(** **)** const |
|
|
+------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_disabled<class_CollisionShape2D_set_disabled>` **(** :ref:`bool<class_bool>` disabled **)** |
|
|
+------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_one_way_collision<class_CollisionShape2D_set_one_way_collision>` **(** :ref:`bool<class_bool>` enabled **)** |
|
|
+------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_shape<class_CollisionShape2D_set_shape>` **(** :ref:`Object<class_object>` shape **)** |
|
|
+------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Member Variables
|
|
----------------
|
|
|
|
- :ref:`bool<class_bool>` **disabled**
|
|
- :ref:`bool<class_bool>` **one_way_collision**
|
|
- :ref:`Shape2D<class_shape2d>` **shape**
|
|
|
|
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.
|
|
|
|
Member Function Description
|
|
---------------------------
|
|
|
|
.. _class_CollisionShape2D_get_shape:
|
|
|
|
- :ref:`Object<class_object>` **get_shape** **(** **)** const
|
|
|
|
Return this shape's :ref:`Shape2D<class_shape2d>`.
|
|
|
|
.. _class_CollisionShape2D_is_disabled:
|
|
|
|
- :ref:`bool<class_bool>` **is_disabled** **(** **)** const
|
|
|
|
.. _class_CollisionShape2D_is_one_way_collision_enabled:
|
|
|
|
- :ref:`bool<class_bool>` **is_one_way_collision_enabled** **(** **)** const
|
|
|
|
.. _class_CollisionShape2D_set_disabled:
|
|
|
|
- void **set_disabled** **(** :ref:`bool<class_bool>` disabled **)**
|
|
|
|
.. _class_CollisionShape2D_set_one_way_collision:
|
|
|
|
- void **set_one_way_collision** **(** :ref:`bool<class_bool>` enabled **)**
|
|
|
|
.. _class_CollisionShape2D_set_shape:
|
|
|
|
- void **set_shape** **(** :ref:`Object<class_object>` shape **)**
|
|
|
|
Set this shape's :ref:`Shape2D<class_shape2d>`. This will not appear as a node, but can be directly edited as a property.
|
|
|
|
|