:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the Joint2D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_Joint2D: Joint2D ======= **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`DampedSpringJoint2D`, :ref:`GrooveJoint2D`, :ref:`PinJoint2D` **Category:** Core Brief Description ----------------- Base node for all joint constraints in 2D physics. Properties ---------- +---------------------------------+--------------------------------------------------------------------+--------------+ | :ref:`float` | :ref:`bias` | 0.0 | +---------------------------------+--------------------------------------------------------------------+--------------+ | :ref:`bool` | :ref:`disable_collision` | true | +---------------------------------+--------------------------------------------------------------------+--------------+ | :ref:`NodePath` | :ref:`node_a` | NodePath("") | +---------------------------------+--------------------------------------------------------------------+--------------+ | :ref:`NodePath` | :ref:`node_b` | NodePath("") | +---------------------------------+--------------------------------------------------------------------+--------------+ Description ----------- Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint. Property Descriptions --------------------- .. _class_Joint2D_property_bias: - :ref:`float` **bias** +-----------+-----------------+ | *Default* | 0.0 | +-----------+-----------------+ | *Setter* | set_bias(value) | +-----------+-----------------+ | *Getter* | get_bias() | +-----------+-----------------+ When :ref:`node_a` and :ref:`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. .. _class_Joint2D_property_disable_collision: - :ref:`bool` **disable_collision** +-----------+-----------------------------------------+ | *Default* | true | +-----------+-----------------------------------------+ | *Setter* | set_exclude_nodes_from_collision(value) | +-----------+-----------------------------------------+ | *Getter* | get_exclude_nodes_from_collision() | +-----------+-----------------------------------------+ If ``true``, :ref:`node_a` and :ref:`node_b` can collide. .. _class_Joint2D_property_node_a: - :ref:`NodePath` **node_a** +-----------+-------------------+ | *Default* | NodePath("") | +-----------+-------------------+ | *Setter* | set_node_a(value) | +-----------+-------------------+ | *Getter* | get_node_a() | +-----------+-------------------+ The first body attached to the joint. Must derive from :ref:`PhysicsBody2D`. .. _class_Joint2D_property_node_b: - :ref:`NodePath` **node_b** +-----------+-------------------+ | *Default* | NodePath("") | +-----------+-------------------+ | *Setter* | set_node_b(value) | +-----------+-------------------+ | *Getter* | get_node_b() | +-----------+-------------------+ The second body attached to the joint. Must derive from :ref:`PhysicsBody2D`.