mirror of
https://github.com/Relintai/pandemonium_engine_docs.git
synced 2025-01-23 15:17:21 +01:00
74 lines
3.0 KiB
ReStructuredText
74 lines
3.0 KiB
ReStructuredText
|
:github_url: hide
|
||
|
|
||
|
.. DO NOT EDIT THIS FILE!!!
|
||
|
.. Generated automatically from Godot engine sources.
|
||
|
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
|
||
|
.. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/Shape.xml.
|
||
|
|
||
|
.. _class_Shape:
|
||
|
|
||
|
Shape
|
||
|
=====
|
||
|
|
||
|
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
||
|
|
||
|
**Inherited By:** :ref:`BoxShape<class_BoxShape>`, :ref:`CapsuleShape<class_CapsuleShape>`, :ref:`ConcavePolygonShape<class_ConcavePolygonShape>`, :ref:`ConvexPolygonShape<class_ConvexPolygonShape>`, :ref:`CylinderShape<class_CylinderShape>`, :ref:`HeightMapShape<class_HeightMapShape>`, :ref:`PlaneShape<class_PlaneShape>`, :ref:`RayShape<class_RayShape>`, :ref:`SphereShape<class_SphereShape>`
|
||
|
|
||
|
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:`PhysicsBody<class_PhysicsBody>` or :ref:`Area<class_Area>` objects.
|
||
|
|
||
|
Tutorials
|
||
|
---------
|
||
|
|
||
|
- :doc:`../tutorials/physics/physics_introduction`
|
||
|
|
||
|
Properties
|
||
|
----------
|
||
|
|
||
|
+---------------------------+--------------------------------------------+----------+
|
||
|
| :ref:`float<class_float>` | :ref:`margin<class_Shape_property_margin>` | ``0.04`` |
|
||
|
+---------------------------+--------------------------------------------+----------+
|
||
|
|
||
|
Methods
|
||
|
-------
|
||
|
|
||
|
+-----------------------------------+----------------------------------------------------------------------+
|
||
|
| :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`get_debug_mesh<class_Shape_method_get_debug_mesh>` **(** **)** |
|
||
|
+-----------------------------------+----------------------------------------------------------------------+
|
||
|
|
||
|
Property Descriptions
|
||
|
---------------------
|
||
|
|
||
|
.. _class_Shape_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_Shape_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 ``Shape``.
|
||
|
|
||
|
.. |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.)`
|