class_collisionshape3d.rst 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/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. Node that represents collision shape data in 3D space.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Editor facility for creating and editing collision shapes in 3D space. Set the :ref:`shape<class_CollisionShape3D_property_shape>` property to configure the shape.
  15. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area3D<class_Area3D>` to give it a detection shape, or add it to a :ref:`PhysicsBody3D<class_PhysicsBody3D>` to create a solid object.
  16. \ **Warning:** A non-uniformly scaled CollisionShape3D node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size of its :ref:`shape<class_CollisionShape3D_property_shape>` resource instead.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`Physics introduction <../tutorials/physics/physics_introduction>`
  21. - `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/126>`__
  22. - `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__
  23. - `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__
  24. .. rst-class:: classref-reftable-group
  25. Properties
  26. ----------
  27. .. table::
  28. :widths: auto
  29. +-------------------------------+-----------------------------------------------------------+-----------+
  30. | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionShape3D_property_disabled>` | ``false`` |
  31. +-------------------------------+-----------------------------------------------------------+-----------+
  32. | :ref:`Shape3D<class_Shape3D>` | :ref:`shape<class_CollisionShape3D_property_shape>` | |
  33. +-------------------------------+-----------------------------------------------------------+-----------+
  34. .. rst-class:: classref-reftable-group
  35. Methods
  36. -------
  37. .. table::
  38. :widths: auto
  39. +------+------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`make_convex_from_siblings<class_CollisionShape3D_method_make_convex_from_siblings>` **(** **)** |
  41. +------+------------------------------------------------------------------------------------------------------------------------------+
  42. | void | :ref:`resource_changed<class_CollisionShape3D_method_resource_changed>` **(** :ref:`Resource<class_Resource>` resource **)** |
  43. +------+------------------------------------------------------------------------------------------------------------------------------+
  44. .. rst-class:: classref-section-separator
  45. ----
  46. .. rst-class:: classref-descriptions-group
  47. Property Descriptions
  48. ---------------------
  49. .. _class_CollisionShape3D_property_disabled:
  50. .. rst-class:: classref-property
  51. :ref:`bool<class_bool>` **disabled** = ``false``
  52. .. rst-class:: classref-property-setget
  53. - void **set_disabled** **(** :ref:`bool<class_bool>` value **)**
  54. - :ref:`bool<class_bool>` **is_disabled** **(** **)**
  55. A disabled collision shape has no effect in the world.
  56. .. rst-class:: classref-item-separator
  57. ----
  58. .. _class_CollisionShape3D_property_shape:
  59. .. rst-class:: classref-property
  60. :ref:`Shape3D<class_Shape3D>` **shape**
  61. .. rst-class:: classref-property-setget
  62. - void **set_shape** **(** :ref:`Shape3D<class_Shape3D>` value **)**
  63. - :ref:`Shape3D<class_Shape3D>` **get_shape** **(** **)**
  64. The actual shape owned by this collision shape.
  65. .. rst-class:: classref-section-separator
  66. ----
  67. .. rst-class:: classref-descriptions-group
  68. Method Descriptions
  69. -------------------
  70. .. _class_CollisionShape3D_method_make_convex_from_siblings:
  71. .. rst-class:: classref-method
  72. void **make_convex_from_siblings** **(** **)**
  73. Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance3D<class_MeshInstance3D>` siblings geometry.
  74. .. rst-class:: classref-item-separator
  75. ----
  76. .. _class_CollisionShape3D_method_resource_changed:
  77. .. rst-class:: classref-method
  78. void **resource_changed** **(** :ref:`Resource<class_Resource>` resource **)**
  79. If this method exists within a script it will be called whenever the shape resource has been modified.
  80. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  81. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  82. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  83. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  84. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  85. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`