mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
111 lines
5.2 KiB
ReStructuredText
111 lines
5.2 KiB
ReStructuredText
.. 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/<name>/doc_classes.
|
|
|
|
.. _class_Joint2D:
|
|
|
|
Joint2D
|
|
=======
|
|
|
|
**Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
|
|
|
|
**Inherited By:** :ref:`PinJoint2D<class_pinjoint2d>`, :ref:`DampedSpringJoint2D<class_dampedspringjoint2d>`, :ref:`GrooveJoint2D<class_groovejoint2d>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Base node for all joint constraints in 2D physics.
|
|
|
|
Member Functions
|
|
----------------
|
|
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_bias<class_Joint2D_get_bias>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`get_exclude_nodes_from_collision<class_Joint2D_get_exclude_nodes_from_collision>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`NodePath<class_nodepath>` | :ref:`get_node_a<class_Joint2D_get_node_a>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`NodePath<class_nodepath>` | :ref:`get_node_b<class_Joint2D_get_node_b>` **(** **)** const |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_bias<class_Joint2D_set_bias>` **(** :ref:`float<class_float>` bias **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_exclude_nodes_from_collision<class_Joint2D_set_exclude_nodes_from_collision>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_node_a<class_Joint2D_set_node_a>` **(** :ref:`NodePath<class_nodepath>` node **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_node_b<class_Joint2D_set_node_b>` **(** :ref:`NodePath<class_nodepath>` node **)** |
|
|
+----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Member Variables
|
|
----------------
|
|
|
|
.. _class_Joint2D_bias:
|
|
|
|
- :ref:`float<class_float>` **bias**
|
|
|
|
.. _class_Joint2D_disable_collision:
|
|
|
|
- :ref:`bool<class_bool>` **disable_collision**
|
|
|
|
.. _class_Joint2D_node_a:
|
|
|
|
- :ref:`NodePath<class_nodepath>` **node_a**
|
|
|
|
.. _class_Joint2D_node_b:
|
|
|
|
- :ref:`NodePath<class_nodepath>` **node_b**
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.
|
|
|
|
Member Function Description
|
|
---------------------------
|
|
|
|
.. _class_Joint2D_get_bias:
|
|
|
|
- :ref:`float<class_float>` **get_bias** **(** **)** const
|
|
|
|
.. _class_Joint2D_get_exclude_nodes_from_collision:
|
|
|
|
- :ref:`bool<class_bool>` **get_exclude_nodes_from_collision** **(** **)** const
|
|
|
|
.. _class_Joint2D_get_node_a:
|
|
|
|
- :ref:`NodePath<class_nodepath>` **get_node_a** **(** **)** const
|
|
|
|
Return the path to the A node for the joint.
|
|
|
|
.. _class_Joint2D_get_node_b:
|
|
|
|
- :ref:`NodePath<class_nodepath>` **get_node_b** **(** **)** const
|
|
|
|
Return the path to the B node for the joint.
|
|
|
|
.. _class_Joint2D_set_bias:
|
|
|
|
- void **set_bias** **(** :ref:`float<class_float>` bias **)**
|
|
|
|
.. _class_Joint2D_set_exclude_nodes_from_collision:
|
|
|
|
- void **set_exclude_nodes_from_collision** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
.. _class_Joint2D_set_node_a:
|
|
|
|
- void **set_node_a** **(** :ref:`NodePath<class_nodepath>` node **)**
|
|
|
|
Set the path to the A node for the joint. Must be of type :ref:`PhysicsBody2D<class_physicsbody2d>`.
|
|
|
|
.. _class_Joint2D_set_node_b:
|
|
|
|
- void **set_node_b** **(** :ref:`NodePath<class_nodepath>` node **)**
|
|
|
|
Set the path to the B node for the joint. Must be of type :ref:`PhysicsBody2D<class_physicsbody2d>`.
|
|
|
|
|