class_collisionshape.rst 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the CollisionShape.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_CollisionShape:
  5. CollisionShape
  6. ==============
  7. **Inherits:** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Node that represents collision shape data in 3D space.
  12. Member Functions
  13. ----------------
  14. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`Shape<class_shape>` | :ref:`get_shape<class_CollisionShape_get_shape>` **(** **)** const |
  16. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`is_disabled<class_CollisionShape_is_disabled>` **(** **)** const |
  18. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`make_convex_from_brothers<class_CollisionShape_make_convex_from_brothers>` **(** **)** |
  20. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`resource_changed<class_CollisionShape_resource_changed>` **(** :ref:`Resource<class_resource>` resource **)** |
  22. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`set_disabled<class_CollisionShape_set_disabled>` **(** :ref:`bool<class_bool>` enable **)** |
  24. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_shape<class_CollisionShape_set_shape>` **(** :ref:`Shape<class_shape>` shape **)** |
  26. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  27. Member Variables
  28. ----------------
  29. - :ref:`bool<class_bool>` **disabled** - A disabled collision shape has no effect in the world.
  30. - :ref:`Shape<class_shape>` **shape** - The actual shape owned by this collision shape.
  31. Description
  32. -----------
  33. Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area<class_area>` to give it a detection shape, or add it to a :ref:`PhysicsBody<class_physicsbody>` to give create solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`get_shape<class_CollisionShape_get_shape>` to get the actual shape.
  34. Member Function Description
  35. ---------------------------
  36. .. _class_CollisionShape_get_shape:
  37. - :ref:`Shape<class_shape>` **get_shape** **(** **)** const
  38. .. _class_CollisionShape_is_disabled:
  39. - :ref:`bool<class_bool>` **is_disabled** **(** **)** const
  40. .. _class_CollisionShape_make_convex_from_brothers:
  41. - void **make_convex_from_brothers** **(** **)**
  42. Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance<class_meshinstance>` siblings geometry.
  43. .. _class_CollisionShape_resource_changed:
  44. - void **resource_changed** **(** :ref:`Resource<class_resource>` resource **)**
  45. If this method exists within a script it will be called whenever the shape resource has been modified.
  46. .. _class_CollisionShape_set_disabled:
  47. - void **set_disabled** **(** :ref:`bool<class_bool>` enable **)**
  48. .. _class_CollisionShape_set_shape:
  49. - void **set_shape** **(** :ref:`Shape<class_shape>` shape **)**