class_shape.rst 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the Shape.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_Shape:
  6. Shape
  7. =====
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **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>`
  10. Base class for all 3D shape resources.
  11. Description
  12. -----------
  13. 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.
  14. Tutorials
  15. ---------
  16. - :doc:`../tutorials/physics/physics_introduction`
  17. Properties
  18. ----------
  19. +---------------------------+--------------------------------------------+----------+
  20. | :ref:`float<class_float>` | :ref:`margin<class_Shape_property_margin>` | ``0.04`` |
  21. +---------------------------+--------------------------------------------+----------+
  22. Property Descriptions
  23. ---------------------
  24. .. _class_Shape_property_margin:
  25. - :ref:`float<class_float>` **margin**
  26. +-----------+-------------------+
  27. | *Default* | ``0.04`` |
  28. +-----------+-------------------+
  29. | *Setter* | set_margin(value) |
  30. +-----------+-------------------+
  31. | *Getter* | get_margin() |
  32. +-----------+-------------------+
  33. The collision margin for the shape.
  34. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  35. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  36. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`