mirror of
https://github.com/Relintai/pandemonium_engine_docs.git
synced 2025-01-23 15:17:21 +01:00
105 lines
4.3 KiB
ReStructuredText
105 lines
4.3 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/Joint2D.xml.
|
|
|
|
.. _class_Joint2D:
|
|
|
|
Joint2D
|
|
=======
|
|
|
|
**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
**Inherited By:** :ref:`DampedSpringJoint2D<class_DampedSpringJoint2D>`, :ref:`GrooveJoint2D<class_GrooveJoint2D>`, :ref:`PinJoint2D<class_PinJoint2D>`
|
|
|
|
Base node for all joint constraints in 2D physics.
|
|
|
|
Description
|
|
-----------
|
|
|
|
Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.
|
|
|
|
Properties
|
|
----------
|
|
|
|
+---------------------------------+--------------------------------------------------------------------+------------------+
|
|
| :ref:`float<class_float>` | :ref:`bias<class_Joint2D_property_bias>` | ``0.0`` |
|
|
+---------------------------------+--------------------------------------------------------------------+------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`disable_collision<class_Joint2D_property_disable_collision>` | ``true`` |
|
|
+---------------------------------+--------------------------------------------------------------------+------------------+
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`node_a<class_Joint2D_property_node_a>` | ``NodePath("")`` |
|
|
+---------------------------------+--------------------------------------------------------------------+------------------+
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`node_b<class_Joint2D_property_node_b>` | ``NodePath("")`` |
|
|
+---------------------------------+--------------------------------------------------------------------+------------------+
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_Joint2D_property_bias:
|
|
|
|
- :ref:`float<class_float>` **bias**
|
|
|
|
+-----------+-----------------+
|
|
| *Default* | ``0.0`` |
|
|
+-----------+-----------------+
|
|
| *Setter* | set_bias(value) |
|
|
+-----------+-----------------+
|
|
| *Getter* | get_bias() |
|
|
+-----------+-----------------+
|
|
|
|
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.
|
|
|
|
----
|
|
|
|
.. _class_Joint2D_property_disable_collision:
|
|
|
|
- :ref:`bool<class_bool>` **disable_collision**
|
|
|
|
+-----------+-----------------------------------------+
|
|
| *Default* | ``true`` |
|
|
+-----------+-----------------------------------------+
|
|
| *Setter* | set_exclude_nodes_from_collision(value) |
|
|
+-----------+-----------------------------------------+
|
|
| *Getter* | get_exclude_nodes_from_collision() |
|
|
+-----------+-----------------------------------------+
|
|
|
|
If ``true``, :ref:`node_a<class_Joint2D_property_node_a>` and :ref:`node_b<class_Joint2D_property_node_b>` can not collide.
|
|
|
|
----
|
|
|
|
.. _class_Joint2D_property_node_a:
|
|
|
|
- :ref:`NodePath<class_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_PhysicsBody2D>`.
|
|
|
|
----
|
|
|
|
.. _class_Joint2D_property_node_b:
|
|
|
|
- :ref:`NodePath<class_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<class_PhysicsBody2D>`.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|