classref: Sync with current master branch (f87858a8f)

This commit is contained in:
Yuri Sizov
2022-12-05 20:38:58 +03:00
parent 913ff5e602
commit a7745c4cc4
843 changed files with 158186 additions and 80821 deletions
+239 -132
View File
@@ -14,6 +14,8 @@ SkeletonModification2DJiggle
A modification that jiggles :ref:`Bone2D<class_Bone2D>` nodes as they move towards a target.
.. rst-class:: classref-introduction-group
Description
-----------
@@ -23,341 +25,446 @@ This modification is useful for adding additional motion to things like hair, th
\ **Note:** The Jiggle modifier has ``jiggle_joints``, which are the data objects that hold the data for each joint in the Jiggle chain. This is different from than :ref:`Bone2D<class_Bone2D>` nodes! Jiggle joints hold the data needed for each :ref:`Bone2D<class_Bone2D>` in the bone chain used by the Jiggle modification.
.. rst-class:: classref-reftable-group
Properties
----------
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`float<class_float>` | :ref:`damping<class_SkeletonModification2DJiggle_property_damping>` | ``0.75`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`gravity<class_SkeletonModification2DJiggle_property_gravity>` | ``Vector2(0, 6)`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`int<class_int>` | :ref:`jiggle_data_chain_length<class_SkeletonModification2DJiggle_property_jiggle_data_chain_length>` | ``0`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`float<class_float>` | :ref:`mass<class_SkeletonModification2DJiggle_property_mass>` | ``0.75`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`float<class_float>` | :ref:`stiffness<class_SkeletonModification2DJiggle_property_stiffness>` | ``3.0`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`NodePath<class_NodePath>` | :ref:`target_nodepath<class_SkeletonModification2DJiggle_property_target_nodepath>` | ``NodePath("")`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`bool<class_bool>` | :ref:`use_gravity<class_SkeletonModification2DJiggle_property_use_gravity>` | ``false`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
.. table::
:widths: auto
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`float<class_float>` | :ref:`damping<class_SkeletonModification2DJiggle_property_damping>` | ``0.75`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`gravity<class_SkeletonModification2DJiggle_property_gravity>` | ``Vector2(0, 6)`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`int<class_int>` | :ref:`jiggle_data_chain_length<class_SkeletonModification2DJiggle_property_jiggle_data_chain_length>` | ``0`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`float<class_float>` | :ref:`mass<class_SkeletonModification2DJiggle_property_mass>` | ``0.75`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`float<class_float>` | :ref:`stiffness<class_SkeletonModification2DJiggle_property_stiffness>` | ``3.0`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`NodePath<class_NodePath>` | :ref:`target_nodepath<class_SkeletonModification2DJiggle_property_target_nodepath>` | ``NodePath("")`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
| :ref:`bool<class_bool>` | :ref:`use_gravity<class_SkeletonModification2DJiggle_property_use_gravity>` | ``false`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+
.. rst-class:: classref-reftable-group
Methods
-------
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_collision_mask<class_SkeletonModification2DJiggle_method_get_collision_mask>` **(** **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`NodePath<class_NodePath>` | :ref:`get_jiggle_joint_bone2d_node<class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone2d_node>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_jiggle_joint_bone_index<class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone_index>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_jiggle_joint_damping<class_SkeletonModification2DJiggle_method_get_jiggle_joint_damping>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`get_jiggle_joint_gravity<class_SkeletonModification2DJiggle_method_get_jiggle_joint_gravity>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_jiggle_joint_mass<class_SkeletonModification2DJiggle_method_get_jiggle_joint_mass>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_jiggle_joint_override<class_SkeletonModification2DJiggle_method_get_jiggle_joint_override>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_jiggle_joint_stiffness<class_SkeletonModification2DJiggle_method_get_jiggle_joint_stiffness>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_jiggle_joint_use_gravity<class_SkeletonModification2DJiggle_method_get_jiggle_joint_use_gravity>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_use_colliders<class_SkeletonModification2DJiggle_method_get_use_colliders>` **(** **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_collision_mask<class_SkeletonModification2DJiggle_method_set_collision_mask>` **(** :ref:`int<class_int>` collision_mask **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_bone2d_node<class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone2d_node>` **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` bone2d_node **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_bone_index<class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone_index>` **(** :ref:`int<class_int>` joint_idx, :ref:`int<class_int>` bone_idx **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_damping<class_SkeletonModification2DJiggle_method_set_jiggle_joint_damping>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` damping **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_gravity<class_SkeletonModification2DJiggle_method_set_jiggle_joint_gravity>` **(** :ref:`int<class_int>` joint_idx, :ref:`Vector2<class_Vector2>` gravity **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_mass<class_SkeletonModification2DJiggle_method_set_jiggle_joint_mass>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` mass **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_override<class_SkeletonModification2DJiggle_method_set_jiggle_joint_override>` **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` override **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_stiffness<class_SkeletonModification2DJiggle_method_set_jiggle_joint_stiffness>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` stiffness **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_use_gravity<class_SkeletonModification2DJiggle_method_set_jiggle_joint_use_gravity>` **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` use_gravity **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_use_colliders<class_SkeletonModification2DJiggle_method_set_use_colliders>` **(** :ref:`bool<class_bool>` use_colliders **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. table::
:widths: auto
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_collision_mask<class_SkeletonModification2DJiggle_method_get_collision_mask>` **(** **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`NodePath<class_NodePath>` | :ref:`get_jiggle_joint_bone2d_node<class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone2d_node>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_jiggle_joint_bone_index<class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone_index>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_jiggle_joint_damping<class_SkeletonModification2DJiggle_method_get_jiggle_joint_damping>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`get_jiggle_joint_gravity<class_SkeletonModification2DJiggle_method_get_jiggle_joint_gravity>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_jiggle_joint_mass<class_SkeletonModification2DJiggle_method_get_jiggle_joint_mass>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_jiggle_joint_override<class_SkeletonModification2DJiggle_method_get_jiggle_joint_override>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_jiggle_joint_stiffness<class_SkeletonModification2DJiggle_method_get_jiggle_joint_stiffness>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_jiggle_joint_use_gravity<class_SkeletonModification2DJiggle_method_get_jiggle_joint_use_gravity>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_use_colliders<class_SkeletonModification2DJiggle_method_get_use_colliders>` **(** **)** |const| |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_collision_mask<class_SkeletonModification2DJiggle_method_set_collision_mask>` **(** :ref:`int<class_int>` collision_mask **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_bone2d_node<class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone2d_node>` **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` bone2d_node **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_bone_index<class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone_index>` **(** :ref:`int<class_int>` joint_idx, :ref:`int<class_int>` bone_idx **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_damping<class_SkeletonModification2DJiggle_method_set_jiggle_joint_damping>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` damping **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_gravity<class_SkeletonModification2DJiggle_method_set_jiggle_joint_gravity>` **(** :ref:`int<class_int>` joint_idx, :ref:`Vector2<class_Vector2>` gravity **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_mass<class_SkeletonModification2DJiggle_method_set_jiggle_joint_mass>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` mass **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_override<class_SkeletonModification2DJiggle_method_set_jiggle_joint_override>` **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` override **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_stiffness<class_SkeletonModification2DJiggle_method_set_jiggle_joint_stiffness>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` stiffness **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_jiggle_joint_use_gravity<class_SkeletonModification2DJiggle_method_set_jiggle_joint_use_gravity>` **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` use_gravity **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_use_colliders<class_SkeletonModification2DJiggle_method_set_use_colliders>` **(** :ref:`bool<class_bool>` use_colliders **)** |
+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_SkeletonModification2DJiggle_property_damping:
- :ref:`float<class_float>` **damping**
.. rst-class:: classref-property
+-----------+--------------------+
| *Default* | ``0.75`` |
+-----------+--------------------+
| *Setter* | set_damping(value) |
+-----------+--------------------+
| *Getter* | get_damping() |
+-----------+--------------------+
:ref:`float<class_float>` **damping** = ``0.75``
.. rst-class:: classref-property-setget
- void **set_damping** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_damping** **(** **)**
The default amount of dampening applied to the Jiggle joints, if they are not overridden. Higher values lead to more of the calculated velocity being applied.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_property_gravity:
- :ref:`Vector2<class_Vector2>` **gravity**
.. rst-class:: classref-property
+-----------+--------------------+
| *Default* | ``Vector2(0, 6)`` |
+-----------+--------------------+
| *Setter* | set_gravity(value) |
+-----------+--------------------+
| *Getter* | get_gravity() |
+-----------+--------------------+
:ref:`Vector2<class_Vector2>` **gravity** = ``Vector2(0, 6)``
.. rst-class:: classref-property-setget
- void **set_gravity** **(** :ref:`Vector2<class_Vector2>` value **)**
- :ref:`Vector2<class_Vector2>` **get_gravity** **(** **)**
The default amount of gravity applied to the Jiggle joints, if they are not overridden.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_property_jiggle_data_chain_length:
- :ref:`int<class_int>` **jiggle_data_chain_length**
.. rst-class:: classref-property
+-----------+-------------------------------------+
| *Default* | ``0`` |
+-----------+-------------------------------------+
| *Setter* | set_jiggle_data_chain_length(value) |
+-----------+-------------------------------------+
| *Getter* | get_jiggle_data_chain_length() |
+-----------+-------------------------------------+
:ref:`int<class_int>` **jiggle_data_chain_length** = ``0``
.. rst-class:: classref-property-setget
- void **set_jiggle_data_chain_length** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_jiggle_data_chain_length** **(** **)**
The amount of Jiggle joints in the Jiggle modification.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_property_mass:
- :ref:`float<class_float>` **mass**
.. rst-class:: classref-property
+-----------+-----------------+
| *Default* | ``0.75`` |
+-----------+-----------------+
| *Setter* | set_mass(value) |
+-----------+-----------------+
| *Getter* | get_mass() |
+-----------+-----------------+
:ref:`float<class_float>` **mass** = ``0.75``
.. rst-class:: classref-property-setget
- void **set_mass** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_mass** **(** **)**
The default amount of mass assigned to the Jiggle joints, if they are not overridden. Higher values lead to faster movements and more overshooting.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_property_stiffness:
- :ref:`float<class_float>` **stiffness**
.. rst-class:: classref-property
+-----------+----------------------+
| *Default* | ``3.0`` |
+-----------+----------------------+
| *Setter* | set_stiffness(value) |
+-----------+----------------------+
| *Getter* | get_stiffness() |
+-----------+----------------------+
:ref:`float<class_float>` **stiffness** = ``3.0``
.. rst-class:: classref-property-setget
- void **set_stiffness** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_stiffness** **(** **)**
The default amount of stiffness assigned to the Jiggle joints, if they are not overridden. Higher values act more like springs, quickly moving into the correct position.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_property_target_nodepath:
- :ref:`NodePath<class_NodePath>` **target_nodepath**
.. rst-class:: classref-property
+-----------+------------------------+
| *Default* | ``NodePath("")`` |
+-----------+------------------------+
| *Setter* | set_target_node(value) |
+-----------+------------------------+
| *Getter* | get_target_node() |
+-----------+------------------------+
:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")``
.. rst-class:: classref-property-setget
- void **set_target_node** **(** :ref:`NodePath<class_NodePath>` value **)**
- :ref:`NodePath<class_NodePath>` **get_target_node** **(** **)**
The NodePath to the node that is the target for the Jiggle modification. This node is what the Jiggle chain will attempt to rotate the bone chain to.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_property_use_gravity:
- :ref:`bool<class_bool>` **use_gravity**
.. rst-class:: classref-property
+-----------+------------------------+
| *Default* | ``false`` |
+-----------+------------------------+
| *Setter* | set_use_gravity(value) |
+-----------+------------------------+
| *Getter* | get_use_gravity() |
+-----------+------------------------+
:ref:`bool<class_bool>` **use_gravity** = ``false``
.. rst-class:: classref-property-setget
- void **set_use_gravity** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **get_use_gravity** **(** **)**
Whether the gravity vector, :ref:`gravity<class_SkeletonModification2DJiggle_property_gravity>`, should be applied to the Jiggle joints, assuming they are not overriding the default settings.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_SkeletonModification2DJiggle_method_get_collision_mask:
- :ref:`int<class_int>` **get_collision_mask** **(** **)** |const|
.. rst-class:: classref-method
:ref:`int<class_int>` **get_collision_mask** **(** **)** |const|
Returns the collision mask used by the Jiggle modifier when collisions are enabled.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone2d_node:
- :ref:`NodePath<class_NodePath>` **get_jiggle_joint_bone2d_node** **(** :ref:`int<class_int>` joint_idx **)** |const|
.. rst-class:: classref-method
:ref:`NodePath<class_NodePath>` **get_jiggle_joint_bone2d_node** **(** :ref:`int<class_int>` joint_idx **)** |const|
Returns the :ref:`Bone2D<class_Bone2D>` node assigned to the Jiggle joint at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone_index:
- :ref:`int<class_int>` **get_jiggle_joint_bone_index** **(** :ref:`int<class_int>` joint_idx **)** |const|
.. rst-class:: classref-method
:ref:`int<class_int>` **get_jiggle_joint_bone_index** **(** :ref:`int<class_int>` joint_idx **)** |const|
Returns the index of the :ref:`Bone2D<class_Bone2D>` node assigned to the Jiggle joint at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_damping:
- :ref:`float<class_float>` **get_jiggle_joint_damping** **(** :ref:`int<class_int>` joint_idx **)** |const|
.. rst-class:: classref-method
:ref:`float<class_float>` **get_jiggle_joint_damping** **(** :ref:`int<class_int>` joint_idx **)** |const|
Returns the amount of damping of the Jiggle joint at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_gravity:
- :ref:`Vector2<class_Vector2>` **get_jiggle_joint_gravity** **(** :ref:`int<class_int>` joint_idx **)** |const|
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **get_jiggle_joint_gravity** **(** :ref:`int<class_int>` joint_idx **)** |const|
Returns a :ref:`Vector2<class_Vector2>` representing the amount of gravity the Jiggle joint at ``joint_idx`` is influenced by.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_mass:
- :ref:`float<class_float>` **get_jiggle_joint_mass** **(** :ref:`int<class_int>` joint_idx **)** |const|
.. rst-class:: classref-method
:ref:`float<class_float>` **get_jiggle_joint_mass** **(** :ref:`int<class_int>` joint_idx **)** |const|
Returns the amount of mass of the jiggle joint at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_override:
- :ref:`bool<class_bool>` **get_jiggle_joint_override** **(** :ref:`int<class_int>` joint_idx **)** |const|
.. rst-class:: classref-method
:ref:`bool<class_bool>` **get_jiggle_joint_override** **(** :ref:`int<class_int>` joint_idx **)** |const|
Returns a boolean that indicates whether the joint at ``joint_idx`` is overriding the default Jiggle joint data defined in the modification.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_stiffness:
- :ref:`float<class_float>` **get_jiggle_joint_stiffness** **(** :ref:`int<class_int>` joint_idx **)** |const|
.. rst-class:: classref-method
:ref:`float<class_float>` **get_jiggle_joint_stiffness** **(** :ref:`int<class_int>` joint_idx **)** |const|
Returns the stiffness of the Jiggle joint at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_use_gravity:
- :ref:`bool<class_bool>` **get_jiggle_joint_use_gravity** **(** :ref:`int<class_int>` joint_idx **)** |const|
.. rst-class:: classref-method
:ref:`bool<class_bool>` **get_jiggle_joint_use_gravity** **(** :ref:`int<class_int>` joint_idx **)** |const|
Returns a boolean that indicates whether the joint at ``joint_idx`` is using gravity or not.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_get_use_colliders:
- :ref:`bool<class_bool>` **get_use_colliders** **(** **)** |const|
.. rst-class:: classref-method
:ref:`bool<class_bool>` **get_use_colliders** **(** **)** |const|
Returns whether the jiggle modifier is taking physics colliders into account when solving.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_set_collision_mask:
- void **set_collision_mask** **(** :ref:`int<class_int>` collision_mask **)**
.. rst-class:: classref-method
void **set_collision_mask** **(** :ref:`int<class_int>` collision_mask **)**
Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone2d_node:
- void **set_jiggle_joint_bone2d_node** **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` bone2d_node **)**
.. rst-class:: classref-method
void **set_jiggle_joint_bone2d_node** **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` bone2d_node **)**
Sets the :ref:`Bone2D<class_Bone2D>` node assigned to the Jiggle joint at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone_index:
- void **set_jiggle_joint_bone_index** **(** :ref:`int<class_int>` joint_idx, :ref:`int<class_int>` bone_idx **)**
.. rst-class:: classref-method
void **set_jiggle_joint_bone_index** **(** :ref:`int<class_int>` joint_idx, :ref:`int<class_int>` bone_idx **)**
Sets the bone index, ``bone_idx``, of the Jiggle joint at ``joint_idx``. When possible, this will also update the ``bone2d_node`` of the Jiggle joint based on data provided by the linked skeleton.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_damping:
- void **set_jiggle_joint_damping** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` damping **)**
.. rst-class:: classref-method
void **set_jiggle_joint_damping** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` damping **)**
Sets the amount of dampening of the Jiggle joint at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_gravity:
- void **set_jiggle_joint_gravity** **(** :ref:`int<class_int>` joint_idx, :ref:`Vector2<class_Vector2>` gravity **)**
.. rst-class:: classref-method
void **set_jiggle_joint_gravity** **(** :ref:`int<class_int>` joint_idx, :ref:`Vector2<class_Vector2>` gravity **)**
Sets the gravity vector of the Jiggle joint at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_mass:
- void **set_jiggle_joint_mass** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` mass **)**
.. rst-class:: classref-method
void **set_jiggle_joint_mass** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` mass **)**
Sets the of mass of the Jiggle joint at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_override:
- void **set_jiggle_joint_override** **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` override **)**
.. rst-class:: classref-method
void **set_jiggle_joint_override** **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` override **)**
Sets whether the Jiggle joint at ``joint_idx`` should override the default Jiggle joint settings. Setting this to ``true`` will make the joint use its own settings rather than the default ones attached to the modification.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_stiffness:
- void **set_jiggle_joint_stiffness** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` stiffness **)**
.. rst-class:: classref-method
void **set_jiggle_joint_stiffness** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` stiffness **)**
Sets the of stiffness of the Jiggle joint at ``joint_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_use_gravity:
- void **set_jiggle_joint_use_gravity** **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` use_gravity **)**
.. rst-class:: classref-method
void **set_jiggle_joint_use_gravity** **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` use_gravity **)**
Sets whether the Jiggle joint at ``joint_idx`` should use gravity.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModification2DJiggle_method_set_use_colliders:
- void **set_use_colliders** **(** :ref:`bool<class_bool>` use_colliders **)**
.. rst-class:: classref-method
void **set_use_colliders** **(** :ref:`bool<class_bool>` use_colliders **)**
If ``true``, the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects.