class_lineshape2d.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_LineShape2D:
  4. LineShape2D
  5. ===========
  6. **Inherits:** :ref:`Shape2D<class_shape2d>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Line shape for 2D collision objects.
  11. Member Functions
  12. ----------------
  13. +--------------------------------+----------------------------------------------------------------------------------------------------+
  14. | :ref:`float<class_float>` | :ref:`get_d<class_LineShape2D_get_d>` **(** **)** const |
  15. +--------------------------------+----------------------------------------------------------------------------------------------------+
  16. | :ref:`Vector2<class_vector2>` | :ref:`get_normal<class_LineShape2D_get_normal>` **(** **)** const |
  17. +--------------------------------+----------------------------------------------------------------------------------------------------+
  18. | void | :ref:`set_d<class_LineShape2D_set_d>` **(** :ref:`float<class_float>` d **)** |
  19. +--------------------------------+----------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_normal<class_LineShape2D_set_normal>` **(** :ref:`Vector2<class_vector2>` normal **)** |
  21. +--------------------------------+----------------------------------------------------------------------------------------------------+
  22. Description
  23. -----------
  24. Line shape for 2D collision objects. 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.
  25. Member Function Description
  26. ---------------------------
  27. .. _class_LineShape2D_get_d:
  28. - :ref:`float<class_float>` **get_d** **(** **)** const
  29. Return the line distance from the origin.
  30. .. _class_LineShape2D_get_normal:
  31. - :ref:`Vector2<class_vector2>` **get_normal** **(** **)** const
  32. Return the line normal.
  33. .. _class_LineShape2D_set_d:
  34. - void **set_d** **(** :ref:`float<class_float>` d **)**
  35. Set the line distance from the origin.
  36. .. _class_LineShape2D_set_normal:
  37. - void **set_normal** **(** :ref:`Vector2<class_vector2>` normal **)**
  38. Set the line normal.