mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
97 lines
4.5 KiB
ReStructuredText
97 lines
4.5 KiB
ReStructuredText
: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<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
**Inherited By:** :ref:`BoxShape3D<class_BoxShape3D>`, :ref:`CapsuleShape3D<class_CapsuleShape3D>`, :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>`, :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>`, :ref:`CylinderShape3D<class_CylinderShape3D>`, :ref:`HeightMapShape3D<class_HeightMapShape3D>`, :ref:`SeparationRayShape3D<class_SeparationRayShape3D>`, :ref:`SphereShape3D<class_SphereShape3D>`, :ref:`WorldBoundaryShape3D<class_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<class_PhysicsBody3D>` or :ref:`Area3D<class_Area3D>` objects.
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`Physics introduction <../tutorials/physics/physics_introduction>`
|
|
|
|
Properties
|
|
----------
|
|
|
|
+---------------------------+----------------------------------------------------------------------+----------+
|
|
| :ref:`float<class_float>` | :ref:`custom_solver_bias<class_Shape3D_property_custom_solver_bias>` | ``0.0`` |
|
|
+---------------------------+----------------------------------------------------------------------+----------+
|
|
| :ref:`float<class_float>` | :ref:`margin<class_Shape3D_property_margin>` | ``0.04`` |
|
|
+---------------------------+----------------------------------------------------------------------+----------+
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-----------------------------------+------------------------------------------------------------------------+
|
|
| :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`get_debug_mesh<class_Shape3D_method_get_debug_mesh>` **(** **)** |
|
|
+-----------------------------------+------------------------------------------------------------------------+
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_Shape3D_property_custom_solver_bias:
|
|
|
|
- :ref:`float<class_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<class_ProjectSettings_property_physics/3d/solver/default_contact_bias>` is used.
|
|
|
|
----
|
|
|
|
.. _class_Shape3D_property_margin:
|
|
|
|
- :ref:`float<class_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<class_ArrayMesh>` **get_debug_mesh** **(** **)**
|
|
|
|
Returns the :ref:`ArrayMesh<class_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.)`
|