class_collisionshape.rst 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. Node that represents collision shape data in 3D space.
  10. Description
  11. -----------
  12. 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.
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/physics/physics_introduction`
  16. Properties
  17. ----------
  18. +---------------------------+---------------------------------------------------------+-----------+
  19. | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionShape_property_disabled>` | ``false`` |
  20. +---------------------------+---------------------------------------------------------+-----------+
  21. | :ref:`Shape<class_Shape>` | :ref:`shape<class_CollisionShape_property_shape>` | |
  22. +---------------------------+---------------------------------------------------------+-----------+
  23. Methods
  24. -------
  25. +------+----------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`make_convex_from_brothers<class_CollisionShape_method_make_convex_from_brothers>` **(** **)** |
  27. +------+----------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`resource_changed<class_CollisionShape_method_resource_changed>` **(** :ref:`Resource<class_Resource>` resource **)** |
  29. +------+----------------------------------------------------------------------------------------------------------------------------+
  30. Property Descriptions
  31. ---------------------
  32. .. _class_CollisionShape_property_disabled:
  33. - :ref:`bool<class_bool>` **disabled**
  34. +-----------+---------------------+
  35. | *Default* | ``false`` |
  36. +-----------+---------------------+
  37. | *Setter* | set_disabled(value) |
  38. +-----------+---------------------+
  39. | *Getter* | is_disabled() |
  40. +-----------+---------------------+
  41. A disabled collision shape has no effect in the world.
  42. ----
  43. .. _class_CollisionShape_property_shape:
  44. - :ref:`Shape<class_Shape>` **shape**
  45. +----------+------------------+
  46. | *Setter* | set_shape(value) |
  47. +----------+------------------+
  48. | *Getter* | get_shape() |
  49. +----------+------------------+
  50. The actual shape owned by this collision shape.
  51. Method Descriptions
  52. -------------------
  53. .. _class_CollisionShape_method_make_convex_from_brothers:
  54. - void **make_convex_from_brothers** **(** **)**
  55. Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance<class_MeshInstance>` siblings geometry.
  56. ----
  57. .. _class_CollisionShape_method_resource_changed:
  58. - void **resource_changed** **(** :ref:`Resource<class_Resource>` resource **)**
  59. If this method exists within a script it will be called whenever the shape resource has been modified.
  60. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  61. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  62. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`