class_collisionshape3d.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the CollisionShape3D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_CollisionShape3D:
  6. CollisionShape3D
  7. ================
  8. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :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:`Area3D<class_Area3D>` to give it a detection shape, or add it to a :ref:`PhysicsBody3D<class_PhysicsBody3D>` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject3D.shape_owner_get_shape<class_CollisionObject3D_method_shape_owner_get_shape>` to get the actual shape.
  13. Tutorials
  14. ---------
  15. - :doc:`Physics introduction <../tutorials/physics/physics_introduction>`
  16. - `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/126>`__
  17. - `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__
  18. - `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__
  19. Properties
  20. ----------
  21. +-------------------------------+-----------------------------------------------------------+-----------+
  22. | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionShape3D_property_disabled>` | ``false`` |
  23. +-------------------------------+-----------------------------------------------------------+-----------+
  24. | :ref:`Shape3D<class_Shape3D>` | :ref:`shape<class_CollisionShape3D_property_shape>` | |
  25. +-------------------------------+-----------------------------------------------------------+-----------+
  26. Methods
  27. -------
  28. +------+------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`make_convex_from_siblings<class_CollisionShape3D_method_make_convex_from_siblings>` **(** **)** |
  30. +------+------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`resource_changed<class_CollisionShape3D_method_resource_changed>` **(** :ref:`Resource<class_Resource>` resource **)** |
  32. +------+------------------------------------------------------------------------------------------------------------------------------+
  33. Property Descriptions
  34. ---------------------
  35. .. _class_CollisionShape3D_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. ----
  46. .. _class_CollisionShape3D_property_shape:
  47. - :ref:`Shape3D<class_Shape3D>` **shape**
  48. +----------+------------------+
  49. | *Setter* | set_shape(value) |
  50. +----------+------------------+
  51. | *Getter* | get_shape() |
  52. +----------+------------------+
  53. The actual shape owned by this collision shape.
  54. Method Descriptions
  55. -------------------
  56. .. _class_CollisionShape3D_method_make_convex_from_siblings:
  57. - void **make_convex_from_siblings** **(** **)**
  58. Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance3D<class_MeshInstance3D>` siblings geometry.
  59. ----
  60. .. _class_CollisionShape3D_method_resource_changed:
  61. - void **resource_changed** **(** :ref:`Resource<class_Resource>` resource **)**
  62. If this method exists within a script it will be called whenever the shape resource has been modified.
  63. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  64. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  65. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  66. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  67. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  68. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`