class_collisionshape3d.rst 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. Node that represents collision shape data in 3D space.
  11. Description
  12. -----------
  13. Editor facility for creating and editing collision shapes in 3D space. Set the :ref:`shape<class_CollisionShape3D_property_shape>` property to configure the shape. **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.
  14. 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.
  15. Tutorials
  16. ---------
  17. - :doc:`Physics introduction <../tutorials/physics/physics_introduction>`
  18. - `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/126>`__
  19. - `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__
  20. - `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__
  21. Properties
  22. ----------
  23. +-------------------------------+-----------------------------------------------------------+-----------+
  24. | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionShape3D_property_disabled>` | ``false`` |
  25. +-------------------------------+-----------------------------------------------------------+-----------+
  26. | :ref:`Shape3D<class_Shape3D>` | :ref:`shape<class_CollisionShape3D_property_shape>` | |
  27. +-------------------------------+-----------------------------------------------------------+-----------+
  28. Methods
  29. -------
  30. +------+------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`make_convex_from_siblings<class_CollisionShape3D_method_make_convex_from_siblings>` **(** **)** |
  32. +------+------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`resource_changed<class_CollisionShape3D_method_resource_changed>` **(** :ref:`Resource<class_Resource>` resource **)** |
  34. +------+------------------------------------------------------------------------------------------------------------------------------+
  35. Property Descriptions
  36. ---------------------
  37. .. _class_CollisionShape3D_property_disabled:
  38. - :ref:`bool<class_bool>` **disabled**
  39. +-----------+---------------------+
  40. | *Default* | ``false`` |
  41. +-----------+---------------------+
  42. | *Setter* | set_disabled(value) |
  43. +-----------+---------------------+
  44. | *Getter* | is_disabled() |
  45. +-----------+---------------------+
  46. A disabled collision shape has no effect in the world.
  47. ----
  48. .. _class_CollisionShape3D_property_shape:
  49. - :ref:`Shape3D<class_Shape3D>` **shape**
  50. +----------+------------------+
  51. | *Setter* | set_shape(value) |
  52. +----------+------------------+
  53. | *Getter* | get_shape() |
  54. +----------+------------------+
  55. The actual shape owned by this collision shape.
  56. Method Descriptions
  57. -------------------
  58. .. _class_CollisionShape3D_method_make_convex_from_siblings:
  59. - void **make_convex_from_siblings** **(** **)**
  60. Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance3D<class_MeshInstance3D>` siblings geometry.
  61. ----
  62. .. _class_CollisionShape3D_method_resource_changed:
  63. - void **resource_changed** **(** :ref:`Resource<class_Resource>` resource **)**
  64. If this method exists within a script it will be called whenever the shape resource has been modified.
  65. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  66. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  67. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  68. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  69. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  70. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`