class_collisionshape.rst 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the CollisionShape.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_CollisionShape:
  6. CollisionShape
  7. ==============
  8. **Inherits:** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Node that represents collision shape data in 3D space.
  13. Properties
  14. ----------
  15. +---------------------------+---------------------------------------------------------+
  16. | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionShape_property_disabled>` |
  17. +---------------------------+---------------------------------------------------------+
  18. | :ref:`Shape<class_Shape>` | :ref:`shape<class_CollisionShape_property_shape>` |
  19. +---------------------------+---------------------------------------------------------+
  20. Methods
  21. -------
  22. +------+----------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`make_convex_from_brothers<class_CollisionShape_method_make_convex_from_brothers>` **(** **)** |
  24. +------+----------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`resource_changed<class_CollisionShape_method_resource_changed>` **(** :ref:`Resource<class_Resource>` resource **)** |
  26. +------+----------------------------------------------------------------------------------------------------------------------------+
  27. Description
  28. -----------
  29. 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 create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject.shape_owner_get_shape<class_CollisionObject_method_shape_owner_get_shape>` to get the actual shape.
  30. Tutorials
  31. ---------
  32. - :doc:`../tutorials/physics/physics_introduction`
  33. Property Descriptions
  34. ---------------------
  35. .. _class_CollisionShape_property_disabled:
  36. - :ref:`bool<class_bool>` **disabled**
  37. +----------+---------------------+
  38. | *Setter* | set_disabled(value) |
  39. +----------+---------------------+
  40. | *Getter* | is_disabled() |
  41. +----------+---------------------+
  42. A disabled collision shape has no effect in the world.
  43. ----
  44. .. _class_CollisionShape_property_shape:
  45. - :ref:`Shape<class_Shape>` **shape**
  46. +----------+------------------+
  47. | *Setter* | set_shape(value) |
  48. +----------+------------------+
  49. | *Getter* | get_shape() |
  50. +----------+------------------+
  51. The actual shape owned by this collision shape.
  52. Method Descriptions
  53. -------------------
  54. .. _class_CollisionShape_method_make_convex_from_brothers:
  55. - void **make_convex_from_brothers** **(** **)**
  56. Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance<class_MeshInstance>` siblings geometry.
  57. ----
  58. .. _class_CollisionShape_method_resource_changed:
  59. - void **resource_changed** **(** :ref:`Resource<class_Resource>` resource **)**
  60. If this method exists within a script it will be called whenever the shape resource has been modified.