class_joint2d.rst 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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:`DampedSpringJoint2D<class_DampedSpringJoint2D>`, :ref:`GrooveJoint2D<class_GrooveJoint2D>`, :ref:`PinJoint2D<class_PinJoint2D>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Base node for all joint constraints in 2D physics.
  13. Properties
  14. ----------
  15. +---------------------------------+--------------------------------------------------------------------+
  16. | :ref:`float<class_float>` | :ref:`bias<class_Joint2D_property_bias>` |
  17. +---------------------------------+--------------------------------------------------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`disable_collision<class_Joint2D_property_disable_collision>` |
  19. +---------------------------------+--------------------------------------------------------------------+
  20. | :ref:`NodePath<class_NodePath>` | :ref:`node_a<class_Joint2D_property_node_a>` |
  21. +---------------------------------+--------------------------------------------------------------------+
  22. | :ref:`NodePath<class_NodePath>` | :ref:`node_b<class_Joint2D_property_node_b>` |
  23. +---------------------------------+--------------------------------------------------------------------+
  24. Description
  25. -----------
  26. Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.
  27. Property Descriptions
  28. ---------------------
  29. .. _class_Joint2D_property_bias:
  30. - :ref:`float<class_float>` **bias**
  31. +----------+-----------------+
  32. | *Setter* | set_bias(value) |
  33. +----------+-----------------+
  34. | *Getter* | get_bias() |
  35. +----------+-----------------+
  36. When :ref:`node_a<class_Joint2D_property_node_a>` and :ref:`node_b<class_Joint2D_property_node_b>` move in different directions the ``bias`` controls how fast the joint pulls them back to their original position. The lower the ``bias`` the more the two bodies can pull on the joint. Default value: ``0``
  37. .. _class_Joint2D_property_disable_collision:
  38. - :ref:`bool<class_bool>` **disable_collision**
  39. +----------+-----------------------------------------+
  40. | *Setter* | set_exclude_nodes_from_collision(value) |
  41. +----------+-----------------------------------------+
  42. | *Getter* | get_exclude_nodes_from_collision() |
  43. +----------+-----------------------------------------+
  44. If ``true``, :ref:`node_a<class_Joint2D_property_node_a>` and :ref:`node_b<class_Joint2D_property_node_b>` can collide. Default value: ``false``.
  45. .. _class_Joint2D_property_node_a:
  46. - :ref:`NodePath<class_NodePath>` **node_a**
  47. +----------+-------------------+
  48. | *Setter* | set_node_a(value) |
  49. +----------+-------------------+
  50. | *Getter* | get_node_a() |
  51. +----------+-------------------+
  52. The first body attached to the joint. Must derive from :ref:`PhysicsBody2D<class_PhysicsBody2D>`.
  53. .. _class_Joint2D_property_node_b:
  54. - :ref:`NodePath<class_NodePath>` **node_b**
  55. +----------+-------------------+
  56. | *Setter* | set_node_b(value) |
  57. +----------+-------------------+
  58. | *Getter* | get_node_b() |
  59. +----------+-------------------+
  60. The second body attached to the joint. Must derive from :ref:`PhysicsBody2D<class_PhysicsBody2D>`.