class_lineshape2d.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. | void | :ref:`set_normal<class_LineShape2D_set_normal>` **(** :ref:`Vector2<class_vector2>` normal **)** |
  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. | :ref:`float<class_float>` | :ref:`get_d<class_LineShape2D_get_d>` **(** **)** const |
  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_set_normal:
  28. - void **set_normal** **(** :ref:`Vector2<class_vector2>` normal **)**
  29. Set the line normal.
  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_get_d:
  37. - :ref:`float<class_float>` **get_d** **(** **)** const
  38. Return the line distance from the origin.