class_rectangleshape2d.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/RectangleShape2D.xml.
  6. .. _class_RectangleShape2D:
  7. RectangleShape2D
  8. ================
  9. **Inherits:** :ref:`Shape2D<class_Shape2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Rectangle shape for 2D collisions.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects.
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - `2D Pong Demo <https://godotengine.org/asset-library/asset/121>`__
  19. - `2D Kinematic Character Demo <https://godotengine.org/asset-library/asset/113>`__
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-------------------------------+---------------------------------------------------------+-----------------------+
  26. | :ref:`Vector2<class_Vector2>` | :ref:`extents<class_RectangleShape2D_property_extents>` | ``Vector2( 10, 10 )`` |
  27. +-------------------------------+---------------------------------------------------------+-----------------------+
  28. .. rst-class:: classref-section-separator
  29. ----
  30. .. rst-class:: classref-descriptions-group
  31. Property Descriptions
  32. ---------------------
  33. .. _class_RectangleShape2D_property_extents:
  34. .. rst-class:: classref-property
  35. :ref:`Vector2<class_Vector2>` **extents** = ``Vector2( 10, 10 )``
  36. .. rst-class:: classref-property-setget
  37. - void **set_extents** **(** :ref:`Vector2<class_Vector2>` value **)**
  38. - :ref:`Vector2<class_Vector2>` **get_extents** **(** **)**
  39. The rectangle's half extents. The width and height of this shape is twice the half extents.
  40. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  41. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  42. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  43. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`