class_collisionshape.rst 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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>` | false |
  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. | *Default* | false |
  39. +-----------+---------------------+
  40. | *Setter* | set_disabled(value) |
  41. +-----------+---------------------+
  42. | *Getter* | is_disabled() |
  43. +-----------+---------------------+
  44. A disabled collision shape has no effect in the world.
  45. .. _class_CollisionShape_property_shape:
  46. - :ref:`Shape<class_Shape>` **shape**
  47. +----------+------------------+
  48. | *Setter* | set_shape(value) |
  49. +----------+------------------+
  50. | *Getter* | get_shape() |
  51. +----------+------------------+
  52. The actual shape owned by this collision shape.
  53. Method Descriptions
  54. -------------------
  55. .. _class_CollisionShape_method_make_convex_from_brothers:
  56. - void **make_convex_from_brothers** **(** **)**
  57. Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance<class_MeshInstance>` siblings geometry.
  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.