class_joint2d.rst 5.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Joint2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Joint2D:
  5. Joint2D
  6. =======
  7. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Inherited By:** :ref:`PinJoint2D<class_pinjoint2d>`, :ref:`DampedSpringJoint2D<class_dampedspringjoint2d>`, :ref:`GrooveJoint2D<class_groovejoint2d>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Base node for all joint constraints in 2D physics.
  13. Member Functions
  14. ----------------
  15. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`float<class_float>` | :ref:`get_bias<class_Joint2D_get_bias>` **(** **)** const |
  17. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`get_exclude_nodes_from_collision<class_Joint2D_get_exclude_nodes_from_collision>` **(** **)** const |
  19. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`NodePath<class_nodepath>` | :ref:`get_node_a<class_Joint2D_get_node_a>` **(** **)** const |
  21. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`NodePath<class_nodepath>` | :ref:`get_node_b<class_Joint2D_get_node_b>` **(** **)** const |
  23. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`set_bias<class_Joint2D_set_bias>` **(** :ref:`float<class_float>` bias **)** |
  25. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`set_exclude_nodes_from_collision<class_Joint2D_set_exclude_nodes_from_collision>` **(** :ref:`bool<class_bool>` enable **)** |
  27. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`set_node_a<class_Joint2D_set_node_a>` **(** :ref:`NodePath<class_nodepath>` node **)** |
  29. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`set_node_b<class_Joint2D_set_node_b>` **(** :ref:`NodePath<class_nodepath>` node **)** |
  31. +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
  32. Member Variables
  33. ----------------
  34. - :ref:`float<class_float>` **bias**
  35. - :ref:`bool<class_bool>` **disable_collision**
  36. - :ref:`NodePath<class_nodepath>` **node_a**
  37. - :ref:`NodePath<class_nodepath>` **node_b**
  38. Description
  39. -----------
  40. Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.
  41. Member Function Description
  42. ---------------------------
  43. .. _class_Joint2D_get_bias:
  44. - :ref:`float<class_float>` **get_bias** **(** **)** const
  45. .. _class_Joint2D_get_exclude_nodes_from_collision:
  46. - :ref:`bool<class_bool>` **get_exclude_nodes_from_collision** **(** **)** const
  47. .. _class_Joint2D_get_node_a:
  48. - :ref:`NodePath<class_nodepath>` **get_node_a** **(** **)** const
  49. Return the path to the A node for the joint.
  50. .. _class_Joint2D_get_node_b:
  51. - :ref:`NodePath<class_nodepath>` **get_node_b** **(** **)** const
  52. Return the path to the B node for the joint.
  53. .. _class_Joint2D_set_bias:
  54. - void **set_bias** **(** :ref:`float<class_float>` bias **)**
  55. .. _class_Joint2D_set_exclude_nodes_from_collision:
  56. - void **set_exclude_nodes_from_collision** **(** :ref:`bool<class_bool>` enable **)**
  57. .. _class_Joint2D_set_node_a:
  58. - void **set_node_a** **(** :ref:`NodePath<class_nodepath>` node **)**
  59. Set the path to the A node for the joint. Must be of type :ref:`PhysicsBody2D<class_physicsbody2d>`.
  60. .. _class_Joint2D_set_node_b:
  61. - void **set_node_b** **(** :ref:`NodePath<class_nodepath>` node **)**
  62. Set the path to the B node for the joint. Must be of type :ref:`PhysicsBody2D<class_physicsbody2d>`.