mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with latest 4.0-dev
This commit is contained in:
75
classes/class_shape3d.rst
Normal file
75
classes/class_shape3d.rst
Normal file
@@ -0,0 +1,75 @@
|
||||
:github_url: hide
|
||||
|
||||
.. Generated automatically by doc/tools/makerst.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/<name>/doc_classes.
|
||||
|
||||
.. _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:`../tutorials/physics/physics_introduction`
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
+---------------------------+----------------------------------------------+----------+
|
||||
| :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_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.)`
|
||||
Reference in New Issue
Block a user