class_lineshape2d.rst 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the LineShape2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_LineShape2D:
  5. LineShape2D
  6. ===========
  7. **Inherits:** :ref:`Shape2D<class_shape2d>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Line shape for 2D collisions.
  12. Member Functions
  13. ----------------
  14. +--------------------------------+----------------------------------------------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`get_d<class_LineShape2D_get_d>` **(** **)** const |
  16. +--------------------------------+----------------------------------------------------------------------------------------------------+
  17. | :ref:`Vector2<class_vector2>` | :ref:`get_normal<class_LineShape2D_get_normal>` **(** **)** const |
  18. +--------------------------------+----------------------------------------------------------------------------------------------------+
  19. | void | :ref:`set_d<class_LineShape2D_set_d>` **(** :ref:`float<class_float>` d **)** |
  20. +--------------------------------+----------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_normal<class_LineShape2D_set_normal>` **(** :ref:`Vector2<class_vector2>` normal **)** |
  22. +--------------------------------+----------------------------------------------------------------------------------------------------+
  23. Member Variables
  24. ----------------
  25. - :ref:`float<class_float>` **d** - The line's distance from the origin.
  26. - :ref:`Vector2<class_vector2>` **normal** - The line's normal.
  27. Description
  28. -----------
  29. Line shape for 2D collisions. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.
  30. Member Function Description
  31. ---------------------------
  32. .. _class_LineShape2D_get_d:
  33. - :ref:`float<class_float>` **get_d** **(** **)** const
  34. Return the line distance from the origin.
  35. .. _class_LineShape2D_get_normal:
  36. - :ref:`Vector2<class_vector2>` **get_normal** **(** **)** const
  37. Return the line normal.
  38. .. _class_LineShape2D_set_d:
  39. - void **set_d** **(** :ref:`float<class_float>` d **)**
  40. Set the line distance from the origin.
  41. .. _class_LineShape2D_set_normal:
  42. - void **set_normal** **(** :ref:`Vector2<class_vector2>` normal **)**
  43. Set the line normal.