class_joint2d.rst 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 Variables
  14. ----------------
  15. .. _class_Joint2D_bias:
  16. - :ref:`float<class_float>` **bias** - When :ref:`node_a<class_Joint2D_node_a>` and :ref:`node_b<class_Joint2D_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``
  17. .. _class_Joint2D_disable_collision:
  18. - :ref:`bool<class_bool>` **disable_collision** - If ``true`` :ref:`node_a<class_Joint2D_node_a>` and :ref:`node_b<class_Joint2D_node_b>` can collide. Default value: ``false``.
  19. .. _class_Joint2D_node_a:
  20. - :ref:`NodePath<class_nodepath>` **node_a** - The first body attached to the joint. Must derive from :ref:`PhysicsBody2D<class_physicsbody2d>`.
  21. .. _class_Joint2D_node_b:
  22. - :ref:`NodePath<class_nodepath>` **node_b** - The second body attached to the joint. Must derive from :ref:`PhysicsBody2D<class_physicsbody2d>`.
  23. Description
  24. -----------
  25. Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.