:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the Shape3D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _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` Base class for all 3D shape resources. Description ----------- Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a :ref:`PhysicsBody3D` or :ref:`Area3D` objects. Tutorials --------- - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` Properties ---------- +---------------------------+----------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`custom_solver_bias` | ``0.0`` | +---------------------------+----------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`margin` | ``0.04`` | +---------------------------+----------------------------------------------------------------------+----------+ Methods ------- +-----------------------------------+------------------------------------------------------------------------+ | :ref:`ArrayMesh` | :ref:`get_debug_mesh` **(** **)** | +-----------------------------------+------------------------------------------------------------------------+ Property Descriptions --------------------- .. _class_Shape3D_property_custom_solver_bias: - :ref:`float` **custom_solver_bias** +-----------+-------------------------------+ | *Default* | ``0.0`` | +-----------+-------------------------------+ | *Setter* | set_custom_solver_bias(value) | +-----------+-------------------------------+ | *Getter* | 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. ---- .. _class_Shape3D_property_margin: - :ref:`float` **margin** +-----------+-------------------+ | *Default* | ``0.04`` | +-----------+-------------------+ | *Setter* | set_margin(value) | +-----------+-------------------+ | *Getter* | get_margin() | +-----------+-------------------+ The collision margin for the shape. Used in Bullet Physics only. 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. Method Descriptions ------------------- .. _class_Shape3D_method_get_debug_mesh: - :ref:`ArrayMesh` **get_debug_mesh** **(** **)** 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.)` .. |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.)`