:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Shape3D.xml. .. _class_Shape3D: Shape3D ======= **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` **Inherited By:** :ref:`BoxShape3D`, :ref:`CapsuleShape3D`, :ref:`ConcavePolygonShape3D`, :ref:`ConvexPolygonShape3D`, :ref:`CylinderShape3D`, :ref:`HeightMapShape3D`, :ref:`SeparationRayShape3D`, :ref:`SphereShape3D`, :ref:`WorldBoundaryShape3D` Abstract base class for 3D shapes used for physics collision. .. rst-class:: classref-introduction-group Description ----------- Abstract base class for all 3D shapes, intended for use in physics. \ **Performance:** Primitive shapes, especially :ref:`SphereShape3D`, are fast to check collisions against. :ref:`ConvexPolygonShape3D` and :ref:`HeightMapShape3D` are slower, and :ref:`ConcavePolygonShape3D` is the slowest. .. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------+----------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`custom_solver_bias` | ``0.0`` | +---------------------------+----------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`margin` | ``0.04`` | +---------------------------+----------------------------------------------------------------------+----------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-----------------------------------+------------------------------------------------------------------+ | :ref:`ArrayMesh` | :ref:`get_debug_mesh`\ (\ ) | +-----------------------------------+------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Shape3D_property_custom_solver_bias: .. rst-class:: classref-property :ref:`float` **custom_solver_bias** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_custom_solver_bias**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_custom_solver_bias**\ (\ ) The shape's custom solver bias. Defines how much bodies react to enforce contact separation when this shape is involved. When set to ``0``, the default value from :ref:`ProjectSettings.physics/3d/solver/default_contact_bias` is used. .. rst-class:: classref-item-separator ---- .. _class_Shape3D_property_margin: .. rst-class:: classref-property :ref:`float` **margin** = ``0.04`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_margin**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_margin**\ (\ ) The collision margin for the shape. This is not used in Godot Physics. Collision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Shape3D_method_get_debug_mesh: .. rst-class:: classref-method :ref:`ArrayMesh` **get_debug_mesh**\ (\ ) :ref:`🔗` Returns the :ref:`ArrayMesh` used to draw the debug collision for this **Shape3D**. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`