class_collisionshape.rst 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. Properties
  13. ----------
  14. +---------------------------+---------------------------------------------------------+
  15. | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionShape_property_disabled>` |
  16. +---------------------------+---------------------------------------------------------+
  17. | :ref:`Shape<class_Shape>` | :ref:`shape<class_CollisionShape_property_shape>` |
  18. +---------------------------+---------------------------------------------------------+
  19. Methods
  20. -------
  21. +------+----------------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`make_convex_from_brothers<class_CollisionShape_method_make_convex_from_brothers>` **(** **)** |
  23. +------+----------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`resource_changed<class_CollisionShape_method_resource_changed>` **(** :ref:`Resource<class_Resource>` resource **)** |
  25. +------+----------------------------------------------------------------------------------------------------------------------------+
  26. Description
  27. -----------
  28. 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.
  29. Tutorials
  30. ---------
  31. - :doc:`../tutorials/physics/physics_introduction`
  32. Property Descriptions
  33. ---------------------
  34. .. _class_CollisionShape_property_disabled:
  35. - :ref:`bool<class_bool>` **disabled**
  36. +----------+---------------------+
  37. | *Setter* | set_disabled(value) |
  38. +----------+---------------------+
  39. | *Getter* | is_disabled() |
  40. +----------+---------------------+
  41. A disabled collision shape has no effect in the world.
  42. .. _class_CollisionShape_property_shape:
  43. - :ref:`Shape<class_Shape>` **shape**
  44. +----------+------------------+
  45. | *Setter* | set_shape(value) |
  46. +----------+------------------+
  47. | *Getter* | get_shape() |
  48. +----------+------------------+
  49. The actual shape owned by this collision shape.
  50. Method Descriptions
  51. -------------------
  52. .. _class_CollisionShape_method_make_convex_from_brothers:
  53. - void **make_convex_from_brothers** **(** **)**
  54. Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance<class_MeshInstance>` siblings geometry.
  55. .. _class_CollisionShape_method_resource_changed:
  56. - void **resource_changed** **(** :ref:`Resource<class_Resource>` resource **)**
  57. If this method exists within a script it will be called whenever the shape resource has been modified.