class_groovejoint2d.rst 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the GrooveJoint2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_GrooveJoint2D:
  5. GrooveJoint2D
  6. =============
  7. **Inherits:** :ref:`Joint2D<class_joint2d>` **<** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Groove constraint for 2D physics.
  12. Member Functions
  13. ----------------
  14. +----------------------------+------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`get_initial_offset<class_GrooveJoint2D_get_initial_offset>` **(** **)** const |
  16. +----------------------------+------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`float<class_float>` | :ref:`get_length<class_GrooveJoint2D_get_length>` **(** **)** const |
  18. +----------------------------+------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`set_initial_offset<class_GrooveJoint2D_set_initial_offset>` **(** :ref:`float<class_float>` offset **)** |
  20. +----------------------------+------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_length<class_GrooveJoint2D_set_length>` **(** :ref:`float<class_float>` length **)** |
  22. +----------------------------+------------------------------------------------------------------------------------------------------------------+
  23. Member Variables
  24. ----------------
  25. - :ref:`float<class_float>` **initial_offset**
  26. - :ref:`float<class_float>` **length**
  27. Description
  28. -----------
  29. Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another.
  30. Member Function Description
  31. ---------------------------
  32. .. _class_GrooveJoint2D_get_initial_offset:
  33. - :ref:`float<class_float>` **get_initial_offset** **(** **)** const
  34. Set the final offset of the groove on body A.
  35. .. _class_GrooveJoint2D_get_length:
  36. - :ref:`float<class_float>` **get_length** **(** **)** const
  37. Return the length of the groove.
  38. .. _class_GrooveJoint2D_set_initial_offset:
  39. - void **set_initial_offset** **(** :ref:`float<class_float>` offset **)**
  40. Set the initial offset of the groove on body A.
  41. .. _class_GrooveJoint2D_set_length:
  42. - void **set_length** **(** :ref:`float<class_float>` length **)**
  43. Set the length of the groove.