class_collisionshape2d.rst 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the CollisionShape2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_CollisionShape2D:
  5. CollisionShape2D
  6. ================
  7. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Node that represents collision shape data in 2D space.
  12. Member Variables
  13. ----------------
  14. .. _class_CollisionShape2D_disabled:
  15. - :ref:`bool<class_bool>` **disabled** - A disabled collision shape has no effect in the world.
  16. .. _class_CollisionShape2D_one_way_collision:
  17. - :ref:`bool<class_bool>` **one_way_collision** - Sets whether this collision shape should only detect collision on one side (top or bottom).
  18. .. _class_CollisionShape2D_shape:
  19. - :ref:`Shape2D<class_shape2d>` **shape** - The actual shape owned by this collision shape.
  20. Description
  21. -----------
  22. Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area2D<class_area2d>` to give it a detection shape, or add it to a :ref:`PhysicsBody2D<class_physicsbody2d>` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`get_shape<class_CollisionShape2D_get_shape>` to get the actual shape.