.. 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` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Editor-only class for easy editing of shapes. Member Functions ---------------- +--------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | :ref:`Shape2D` | :ref:`get_shape` **(** **)** const | +--------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_disabled` **(** **)** const | +--------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_one_way_collision_enabled` **(** **)** const | +--------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_disabled` **(** :ref:`bool` disabled **)** | +--------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_one_way_collision` **(** :ref:`bool` enabled **)** | +--------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_shape` **(** :ref:`Shape2D` shape **)** | +--------------------------------+--------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- - :ref:`bool` **disabled** - :ref:`bool` **one_way_collision** - :ref:`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`. This is not accessible from regular code. Member Function Description --------------------------- .. _class_CollisionShape2D_get_shape: - :ref:`Shape2D` **get_shape** **(** **)** const Return this shape's :ref:`Shape2D`. .. _class_CollisionShape2D_is_disabled: - :ref:`bool` **is_disabled** **(** **)** const .. _class_CollisionShape2D_is_one_way_collision_enabled: - :ref:`bool` **is_one_way_collision_enabled** **(** **)** const .. _class_CollisionShape2D_set_disabled: - void **set_disabled** **(** :ref:`bool` disabled **)** .. _class_CollisionShape2D_set_one_way_collision: - void **set_one_way_collision** **(** :ref:`bool` enabled **)** .. _class_CollisionShape2D_set_shape: - void **set_shape** **(** :ref:`Shape2D` shape **)** Set this shape's :ref:`Shape2D`. This will not appear as a node, but can be directly edited as a property.