class_capsuleshape2d.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CapsuleShape2D.xml.
  6. .. _class_CapsuleShape2D:
  7. CapsuleShape2D
  8. ==============
  9. **Inherits:** :ref:`Shape2D<class_Shape2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A 2D capsule shape used for physics collision.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A 2D capsule shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape2D<class_CollisionShape2D>`.
  15. \ **Performance:** **CapsuleShape2D** is fast to check collisions against, but it is slower than :ref:`RectangleShape2D<class_RectangleShape2D>` and :ref:`CircleShape2D<class_CircleShape2D>`.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +---------------------------+-----------------------------------------------------+----------+
  22. | :ref:`float<class_float>` | :ref:`height<class_CapsuleShape2D_property_height>` | ``30.0`` |
  23. +---------------------------+-----------------------------------------------------+----------+
  24. | :ref:`float<class_float>` | :ref:`radius<class_CapsuleShape2D_property_radius>` | ``10.0`` |
  25. +---------------------------+-----------------------------------------------------+----------+
  26. .. rst-class:: classref-section-separator
  27. ----
  28. .. rst-class:: classref-descriptions-group
  29. Property Descriptions
  30. ---------------------
  31. .. _class_CapsuleShape2D_property_height:
  32. .. rst-class:: classref-property
  33. :ref:`float<class_float>` **height** = ``30.0``
  34. .. rst-class:: classref-property-setget
  35. - void **set_height** **(** :ref:`float<class_float>` value **)**
  36. - :ref:`float<class_float>` **get_height** **(** **)**
  37. The capsule's height.
  38. .. rst-class:: classref-item-separator
  39. ----
  40. .. _class_CapsuleShape2D_property_radius:
  41. .. rst-class:: classref-property
  42. :ref:`float<class_float>` **radius** = ``10.0``
  43. .. rst-class:: classref-property-setget
  44. - void **set_radius** **(** :ref:`float<class_float>` value **)**
  45. - :ref:`float<class_float>` **get_radius** **(** **)**
  46. The capsule's radius.
  47. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  48. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  49. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  50. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  51. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  52. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  53. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`