A modification that jiggles [Bone2D] nodes as they move towards a target.
</brief_description>
<description>
This modification moves a series of bones, typically called a bone chain, towards a target. What makes this modification special is that it calculates the velocity and acceleration for each bone in the bone chain, and runs a very light physics-like calculation using the inputted values. This allows the bones to overshoot the target and "jiggle" around. It can be configured to act more like a spring, or sway around like cloth might.
This modification is useful for adding additional motion to things like hair, the edges of clothing, and more. It has several settings to that allow control over how the joint moves when the target moves.
[b]Note:[/b] The Jiggle modifier has [code]jiggle_joints[/code], which are the data objects that hold the data for each joint in the Jiggle chain. This is different from than [Bone2D] nodes! Jiggle joints hold the data needed for each [Bone2D] in the bone chain used by the Jiggle modification.
Sets the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code].
</description>
</method>
<methodname="set_jiggle_joint_bone_index">
<returntype="void">
</return>
<argumentindex="0"name="joint_idx"type="int">
</argument>
<argumentindex="1"name="bone_idx"type="int">
</argument>
<description>
Sets the bone index, [code]bone_index[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the Jiggle joint based on data provided by the linked skeleton.
</description>
</method>
<methodname="set_jiggle_joint_damping">
<returntype="void">
</return>
<argumentindex="0"name="joint_idx"type="int">
</argument>
<argumentindex="1"name="damping"type="float">
</argument>
<description>
Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code].
</description>
</method>
<methodname="set_jiggle_joint_gravity">
<returntype="void">
</return>
<argumentindex="0"name="joint_idx"type="int">
</argument>
<argumentindex="1"name="gravity"type="Vector2">
</argument>
<description>
Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code].
</description>
</method>
<methodname="set_jiggle_joint_mass">
<returntype="void">
</return>
<argumentindex="0"name="joint_idx"type="int">
</argument>
<argumentindex="1"name="mass"type="float">
</argument>
<description>
Sets the of mass of the Jiggle joint at [code]joint_idx[/code].
</description>
</method>
<methodname="set_jiggle_joint_override">
<returntype="void">
</return>
<argumentindex="0"name="joint_idx"type="int">
</argument>
<argumentindex="1"name="override"type="bool">
</argument>
<description>
Sets whether the Jiggle joint at [code]joint_idx[/code] should override the default Jiggle joint settings. Setting this to [code]true[/code] will make the joint use its own settings rather than the default ones attached to the modification.
</description>
</method>
<methodname="set_jiggle_joint_stiffness">
<returntype="void">
</return>
<argumentindex="0"name="joint_idx"type="int">
</argument>
<argumentindex="1"name="stiffness"type="float">
</argument>
<description>
Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code].
</description>
</method>
<methodname="set_jiggle_joint_use_gravity">
<returntype="void">
</return>
<argumentindex="0"name="joint_idx"type="int">
</argument>
<argumentindex="1"name="use_gravity"type="bool">
</argument>
<description>
Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity.
The default amount of dampening applied to the Jiggle joints, if they are not overriden. Higher values lead to more of the calculated velocity being applied.
The default amount of stiffness assigned to the Jiggle joints, if they are not overriden. Higher values act more like springs, quickly moving into the correct position.