class_collisionshape3d.rst 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CollisionShape3D.xml.
  6. .. _class_CollisionShape3D:
  7. CollisionShape3D
  8. ================
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A node that provides a :ref:`Shape3D<class_Shape3D>` to a :ref:`CollisionObject3D<class_CollisionObject3D>` parent.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A node that provides a :ref:`Shape3D<class_Shape3D>` to a :ref:`CollisionObject3D<class_CollisionObject3D>` parent and allows to edit it. This can give a detection shape to an :ref:`Area3D<class_Area3D>` or turn a :ref:`PhysicsBody3D<class_PhysicsBody3D>` into a solid object.
  15. \ **Warning:** A non-uniformly scaled **CollisionShape3D** will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its :ref:`shape<class_CollisionShape3D_property_shape>` resource instead.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Physics introduction <../tutorials/physics/physics_introduction>`
  20. - `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/2739>`__
  21. - `3D Platformer Demo <https://godotengine.org/asset-library/asset/2748>`__
  22. - `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__
  23. .. rst-class:: classref-reftable-group
  24. Properties
  25. ----------
  26. .. table::
  27. :widths: auto
  28. +-------------------------------+-----------------------------------------------------------------+-----------------------+
  29. | :ref:`Color<class_Color>` | :ref:`debug_color<class_CollisionShape3D_property_debug_color>` | ``Color(0, 0, 0, 0)`` |
  30. +-------------------------------+-----------------------------------------------------------------+-----------------------+
  31. | :ref:`bool<class_bool>` | :ref:`debug_fill<class_CollisionShape3D_property_debug_fill>` | ``true`` |
  32. +-------------------------------+-----------------------------------------------------------------+-----------------------+
  33. | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionShape3D_property_disabled>` | ``false`` |
  34. +-------------------------------+-----------------------------------------------------------------+-----------------------+
  35. | :ref:`Shape3D<class_Shape3D>` | :ref:`shape<class_CollisionShape3D_property_shape>` | |
  36. +-------------------------------+-----------------------------------------------------------------+-----------------------+
  37. .. rst-class:: classref-reftable-group
  38. Methods
  39. -------
  40. .. table::
  41. :widths: auto
  42. +--------+---------------------------------------------------------------------------------------------------------------------------+
  43. | |void| | :ref:`make_convex_from_siblings<class_CollisionShape3D_method_make_convex_from_siblings>`\ (\ ) |
  44. +--------+---------------------------------------------------------------------------------------------------------------------------+
  45. | |void| | :ref:`resource_changed<class_CollisionShape3D_method_resource_changed>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |
  46. +--------+---------------------------------------------------------------------------------------------------------------------------+
  47. .. rst-class:: classref-section-separator
  48. ----
  49. .. rst-class:: classref-descriptions-group
  50. Property Descriptions
  51. ---------------------
  52. .. _class_CollisionShape3D_property_debug_color:
  53. .. rst-class:: classref-property
  54. :ref:`Color<class_Color>` **debug_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_CollisionShape3D_property_debug_color>`
  55. .. rst-class:: classref-property-setget
  56. - |void| **set_debug_color**\ (\ value\: :ref:`Color<class_Color>`\ )
  57. - :ref:`Color<class_Color>` **get_debug_color**\ (\ )
  58. The collision shape color that is displayed in the editor, or in the running project if **Debug > Visible Collision Shapes** is checked at the top of the editor.
  59. \ **Note:** The default value is :ref:`ProjectSettings.debug/shapes/collision/shape_color<class_ProjectSettings_property_debug/shapes/collision/shape_color>`. The ``Color(0, 0, 0, 0)`` value documented here is a placeholder, and not the actual default debug color.
  60. .. rst-class:: classref-item-separator
  61. ----
  62. .. _class_CollisionShape3D_property_debug_fill:
  63. .. rst-class:: classref-property
  64. :ref:`bool<class_bool>` **debug_fill** = ``true`` :ref:`🔗<class_CollisionShape3D_property_debug_fill>`
  65. .. rst-class:: classref-property-setget
  66. - |void| **set_enable_debug_fill**\ (\ value\: :ref:`bool<class_bool>`\ )
  67. - :ref:`bool<class_bool>` **get_enable_debug_fill**\ (\ )
  68. If ``true``, when the shape is displayed, it will show a solid fill color in addition to its wireframe.
  69. .. rst-class:: classref-item-separator
  70. ----
  71. .. _class_CollisionShape3D_property_disabled:
  72. .. rst-class:: classref-property
  73. :ref:`bool<class_bool>` **disabled** = ``false`` :ref:`🔗<class_CollisionShape3D_property_disabled>`
  74. .. rst-class:: classref-property-setget
  75. - |void| **set_disabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  76. - :ref:`bool<class_bool>` **is_disabled**\ (\ )
  77. A disabled collision shape has no effect in the world.
  78. .. rst-class:: classref-item-separator
  79. ----
  80. .. _class_CollisionShape3D_property_shape:
  81. .. rst-class:: classref-property
  82. :ref:`Shape3D<class_Shape3D>` **shape** :ref:`🔗<class_CollisionShape3D_property_shape>`
  83. .. rst-class:: classref-property-setget
  84. - |void| **set_shape**\ (\ value\: :ref:`Shape3D<class_Shape3D>`\ )
  85. - :ref:`Shape3D<class_Shape3D>` **get_shape**\ (\ )
  86. The actual shape owned by this collision shape.
  87. .. rst-class:: classref-section-separator
  88. ----
  89. .. rst-class:: classref-descriptions-group
  90. Method Descriptions
  91. -------------------
  92. .. _class_CollisionShape3D_method_make_convex_from_siblings:
  93. .. rst-class:: classref-method
  94. |void| **make_convex_from_siblings**\ (\ ) :ref:`🔗<class_CollisionShape3D_method_make_convex_from_siblings>`
  95. Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance3D<class_MeshInstance3D>` siblings geometry.
  96. .. rst-class:: classref-item-separator
  97. ----
  98. .. _class_CollisionShape3D_method_resource_changed:
  99. .. rst-class:: classref-method
  100. |void| **resource_changed**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_CollisionShape3D_method_resource_changed>`
  101. **Deprecated:** Use :ref:`Resource.changed<class_Resource_signal_changed>` instead.
  102. This method does nothing.
  103. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  104. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  105. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  106. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  107. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  108. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  109. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  110. .. |void| replace:: :abbr:`void (No return value.)`