class_collisionshape.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the CollisionShape.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_CollisionShape:
  5. CollisionShape
  6. ==============
  7. **Inherits:** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Node that represents collision shape data in 3D space.
  12. Member Functions
  13. ----------------
  14. +-------+---------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`make_convex_from_brothers<class_CollisionShape_make_convex_from_brothers>` **(** **)** |
  16. +-------+---------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`resource_changed<class_CollisionShape_resource_changed>` **(** :ref:`Resource<class_resource>` resource **)** |
  18. +-------+---------------------------------------------------------------------------------------------------------------------+
  19. Member Variables
  20. ----------------
  21. .. _class_CollisionShape_disabled:
  22. - :ref:`bool<class_bool>` **disabled** - A disabled collision shape has no effect in the world.
  23. .. _class_CollisionShape_shape:
  24. - :ref:`Shape<class_shape>` **shape** - The actual shape owned by this collision shape.
  25. Description
  26. -----------
  27. 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:`get_shape<class_CollisionShape_get_shape>` to get the actual shape.
  28. Member Function Description
  29. ---------------------------
  30. .. _class_CollisionShape_make_convex_from_brothers:
  31. - void **make_convex_from_brothers** **(** **)**
  32. Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance<class_meshinstance>` siblings geometry.
  33. .. _class_CollisionShape_resource_changed:
  34. - void **resource_changed** **(** :ref:`Resource<class_resource>` resource **)**
  35. If this method exists within a script it will be called whenever the shape resource has been modified.