class_groovejoint2d.rst 2.6 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_GrooveJoint2D:
  4. GrooveJoint2D
  5. =============
  6. **Inherits:** :ref:`Joint2D<class_joint2d>` **<** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Groove constraint for 2D physics.
  11. Member Functions
  12. ----------------
  13. +----------------------------+------------------------------------------------------------------------------------------------------------------+
  14. | void | :ref:`set_length<class_GrooveJoint2D_set_length>` **(** :ref:`float<class_float>` length **)** |
  15. +----------------------------+------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`float<class_float>` | :ref:`get_length<class_GrooveJoint2D_get_length>` **(** **)** const |
  17. +----------------------------+------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`set_initial_offset<class_GrooveJoint2D_set_initial_offset>` **(** :ref:`float<class_float>` offset **)** |
  19. +----------------------------+------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`float<class_float>` | :ref:`get_initial_offset<class_GrooveJoint2D_get_initial_offset>` **(** **)** const |
  21. +----------------------------+------------------------------------------------------------------------------------------------------------------+
  22. Description
  23. -----------
  24. Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another.
  25. Member Function Description
  26. ---------------------------
  27. .. _class_GrooveJoint2D_set_length:
  28. - void **set_length** **(** :ref:`float<class_float>` length **)**
  29. Set the length of the groove.
  30. .. _class_GrooveJoint2D_get_length:
  31. - :ref:`float<class_float>` **get_length** **(** **)** const
  32. Return the length of the groove.
  33. .. _class_GrooveJoint2D_set_initial_offset:
  34. - void **set_initial_offset** **(** :ref:`float<class_float>` offset **)**
  35. Set the initial offset of the groove on body A.
  36. .. _class_GrooveJoint2D_get_initial_offset:
  37. - :ref:`float<class_float>` **get_initial_offset** **(** **)** const
  38. Set the final offset of the groove on body A.