summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/BoneAttachment3D.xml65
-rw-r--r--doc/classes/Skeleton3D.xml158
-rw-r--r--doc/classes/SkeletonModification3D.xml68
-rw-r--r--doc/classes/SkeletonModification3DCCDIK.xml138
-rw-r--r--doc/classes/SkeletonModification3DFABRIK.xml163
-rw-r--r--doc/classes/SkeletonModification3DJiggle.xml201
-rw-r--r--doc/classes/SkeletonModification3DLookAt.xml66
-rw-r--r--doc/classes/SkeletonModification3DStackHolder.xml29
-rw-r--r--doc/classes/SkeletonModification3DTwoBoneIK.xml193
-rw-r--r--doc/classes/SkeletonModificationStack3D.xml90
10 files changed, 1157 insertions, 14 deletions
diff --git a/doc/classes/BoneAttachment3D.xml b/doc/classes/BoneAttachment3D.xml
index ab1e5b17d9..b493002c70 100644
--- a/doc/classes/BoneAttachment3D.xml
+++ b/doc/classes/BoneAttachment3D.xml
@@ -4,13 +4,76 @@
A node that will attach to a bone.
</brief_description>
<description>
- This node must be the child of a [Skeleton3D] node. You can then select a bone for this node to attach to. The BoneAttachment3D node will copy the transform of the selected bone.
+ This node will allow you to select a bone for this node to attach to. The BoneAttachment3D node can copy the transform of the select bone, or can override the transform of the selected bone.
+ The BoneAttachment3D node must either be a child of a [Skeleton3D] node or be given an external [Skeleton3D] to use in order to function properly.
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="get_external_skeleton" qualifiers="const">
+ <return type="NodePath" />
+ <description>
+ Returns the [NodePath] to the external [Skeleton3D] node, if one has been set.
+ </description>
+ </method>
+ <method name="get_override_mode" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the override mode for the BoneAttachment3D node.
+ </description>
+ </method>
+ <method name="get_override_pose" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether the BoneAttachment3D node is overriding the bone pose of the bone it's attached to.
+ </description>
+ </method>
+ <method name="get_use_external_skeleton" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether the BoneAttachment3D node is using an external [Skeleton3D] rather than attempting to use its parent node as the [Skeleton3D].
+ </description>
+ </method>
+ <method name="on_bone_pose_update">
+ <return type="void" />
+ <argument index="0" name="bone_index" type="int" />
+ <description>
+ A function that is called automatically when the [Skeleton3D] the BoneAttachment3D node is using has a bone that has changed its pose. This function is where the BoneAttachment3D node updates its position so it is correctly bound when it is [i]not[/i] set to override the bone pose.
+ </description>
+ </method>
+ <method name="set_external_skeleton">
+ <return type="void" />
+ <argument index="0" name="external_skeleton" type="NodePath" />
+ <description>
+ Sets the [NodePath] to the external skeleton that the BoneAttachment3D node should use. The external [Skeleton3D] node is only used when [code]use_external_skeleton[/code] is set to [code]true[/code].
+ </description>
+ </method>
+ <method name="set_override_mode">
+ <return type="void" />
+ <argument index="0" name="override_mode" type="int" />
+ <description>
+ Sets the override mode for the BoneAttachment3D node. The override mode defines which of the bone poses the BoneAttachment3D node will override.
+ </description>
+ </method>
+ <method name="set_override_pose">
+ <return type="void" />
+ <argument index="0" name="override_pose" type="bool" />
+ <description>
+ Sets whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to [code]true[/code], the BoneAttachment3D node can change the pose of the bone.
+ </description>
+ </method>
+ <method name="set_use_external_skeleton">
+ <return type="void" />
+ <argument index="0" name="use_external_skeleton" type="bool" />
+ <description>
+ Sets whether the BoneAttachment3D node will use an extenral [Skeleton3D] node rather than attenpting to use its parent node as the [Skeleton3D]. When set to [code]true[/code], the BoneAttachment3D node will use the external [Skeleton3D] node set in [code]set_external_skeleton[/code].
+ </description>
+ </method>
</methods>
<members>
+ <member name="bone_idx" type="int" setter="set_bone_idx" getter="get_bone_idx" default="-1">
+ The index of the attached bone.
+ </member>
<member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name" default="&quot;&quot;">
The name of the attached bone.
</member>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index 0ec2f6b7ca..2f340adb9f 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -20,9 +20,10 @@
Adds a bone, with name [code]name[/code]. [method get_bone_count] will become the bone index.
</description>
</method>
- <method name="bone_transform_to_world_transform">
- <return type="Transform3D" />
- <argument index="0" name="bone_transform" type="Transform3D" />
+ <method name="add_bone_child">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="child_bone_idx" type="int" />
<description>
Takes the given bone pose/transform and converts it to a world transform, relative to the [Skeleton3D] node.
This is useful for using the bone transform in calculations with transforms from [Node3D]-based nodes.
@@ -40,6 +41,20 @@
Removes the global pose override on all bones in the skeleton.
</description>
</method>
+ <method name="clear_bones_local_pose_override">
+ <return type="void" />
+ <description>
+ Removes the local pose override on all bones in the skeleton.
+ </description>
+ </method>
+ <method name="execute_modifications">
+ <return type="void" />
+ <argument index="0" name="delta" type="float" />
+ <argument index="1" name="execution_mode" type="int" />
+ <description>
+ Executes all the modifications on the [SkeletonModificationStack3D], if the Skeleton3D has one assigned.
+ </description>
+ </method>
<method name="find_bone" qualifiers="const">
<return type="int" />
<argument index="0" name="name" type="String" />
@@ -47,6 +62,26 @@
Returns the bone index that matches [code]name[/code] as its name.
</description>
</method>
+ <method name="force_update_all_bone_transforms">
+ <return type="void" />
+ <description>
+ Force updates the bone transforms/poses for all bones in the skeleton.
+ </description>
+ </method>
+ <method name="force_update_bone_child_transform">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Force updates the bone transform for the bone at [code]bone_idx[/code] and all of its children.
+ </description>
+ </method>
+ <method name="get_bone_children">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Returns an array containing the bone indexes of all the children node of the passed in bone, [code]bone_idx[/code].
+ </description>
+ </method>
<method name="get_bone_count" qualifiers="const">
<return type="int" />
<description>
@@ -74,6 +109,19 @@
Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.
</description>
</method>
+ <method name="get_bone_global_pose_override" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_bone_local_pose_override" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Returns the local pose override transform for [code]bone_idx[/code].
+ </description>
+ </method>
<method name="get_bone_name" qualifiers="const">
<return type="String" />
<argument index="0" name="bone_idx" type="int" />
@@ -96,16 +144,49 @@
Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose.
</description>
</method>
- <method name="get_bone_process_orders">
+ <method name="get_bone_rest" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Returns the rest transform for a bone [code]bone_idx[/code].
+ </description>
+ </method>
+ <method name="get_modification_stack">
+ <return type="SkeletonModificationStack3D" />
+ <description>
+ Returns the modification stack attached to this skeleton, if one exists.
+ </description>
+ </method>
+ <method name="get_parentless_bones">
<return type="PackedInt32Array" />
<description>
+ Returns an array with all of the bones that are parentless. Another way to look at this is that it returns the indexes of all the bones that are not dependent or modified by other bones in the Skeleton.
</description>
</method>
- <method name="get_bone_rest" qualifiers="const">
+ <method name="global_pose_to_local_pose">
<return type="Transform3D" />
<argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="global_pose" type="Transform3D" />
<description>
- Returns the rest transform for a bone [code]bone_idx[/code].
+ Takes the passed-in global pose and converts it to local pose transform.
+ This can be used to easily convert a global pose from [method get_bone_global_pose] to a global transform in [method set_bone_local_pose_override].
+ </description>
+ </method>
+ <method name="global_pose_to_world_transform">
+ <return type="Transform3D" />
+ <argument index="0" name="global_pose" type="Transform3D" />
+ <description>
+ Takes the passed-in global pose and converts it to a world transform.
+ This can be used to easily convert a global pose from [method get_bone_global_pose] to a global transform usable with a node's transform, like [member Node3D.global_transform] for example.
+ </description>
+ </method>
+ <method name="global_pose_z_forward_to_bone_forward">
+ <return type="Basis" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="basis" type="Basis" />
+ <description>
+ Rotates the given [Basis] so that the forward axis of the Basis is facing in the forward direction of the bone at [code]bone_idx[/code].
+ This is helper function to make using [method Transform3D.looking_at] easier with bone poses.
</description>
</method>
<method name="is_bone_rest_disabled" qualifiers="const">
@@ -115,6 +196,15 @@
Returns whether the bone rest for the bone at [code]bone_idx[/code] is disabled.
</description>
</method>
+ <method name="local_pose_to_global_pose">
+ <return type="Transform3D" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="local_pose" type="Transform3D" />
+ <description>
+ Converts the passed-in local pose to a global pose relative to the inputted bone, [code]bone_idx[/code].
+ This could be used to convert [method get_bone_pose] for use with the [method set_bone_global_pose_override] function.
+ </description>
+ </method>
<method name="localize_rests">
<return type="void" />
<description>
@@ -158,13 +248,30 @@
Binds the given Skin to the Skeleton.
</description>
</method>
+ <method name="remove_bone_child">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="child_bone_idx" type="int" />
+ <description>
+ Removes the passed in child bone index, [code]child_bone_idx[/code], from the passed-in bone, [code]bone_idx[/code], if it exists.
+ [b]Note:[/b] This does not remove the child bone, but instead it removes the connection it has to the parent bone.
+ </description>
+ </method>
+ <method name="set_bone_children">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="bone_children" type="PackedInt32Array" />
+ <description>
+ Sets the children for the passed in bone, [code]bone_idx[/code], to the passed-in array of bone indexes, [code]bone_children[/code].
+ </description>
+ </method>
<method name="set_bone_custom_pose">
<return type="void" />
<argument index="0" name="bone_idx" type="int" />
<argument index="1" name="custom_pose" type="Transform3D" />
<description>
Sets the custom pose transform, [code]custom_pose[/code], for the bone at [code]bone_idx[/code]. This pose is an addition to the bone rest pose.
- [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space.
+ [b]Note:[/b] The pose transform needs to be in bone space. Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to bone space.
</description>
</method>
<method name="set_bone_disable_rest">
@@ -183,8 +290,20 @@
<argument index="3" name="persistent" type="bool" default="false" />
<description>
Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
- [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
- [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space.
+ [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
+ [b]Note:[/b] The pose transform needs to be a global pose! Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to a global pose.
+ </description>
+ </method>
+ <method name="set_bone_local_pose_override">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="pose" type="Transform3D" />
+ <argument index="2" name="amount" type="float" />
+ <argument index="3" name="persistent" type="bool" default="false" />
+ <description>
+ Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
+ [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
+ [b]Note:[/b] The pose transform needs to be a local pose! Use [method global_pose_to_local_pose] to convert a global pose to a local pose.
</description>
</method>
<method name="set_bone_name">
@@ -209,7 +328,7 @@
<argument index="1" name="pose" type="Transform3D" />
<description>
Sets the pose transform for bone [code]bone_idx[/code].
- [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space.
+ [b]Note:[/b] The pose transform needs to be in bone space. Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to bone space.
</description>
</method>
<method name="set_bone_rest">
@@ -220,6 +339,13 @@
Sets the rest transform for bone [code]bone_idx[/code].
</description>
</method>
+ <method name="set_modification_stack">
+ <return type="void" />
+ <argument index="0" name="modification_stack" type="SkeletonModificationStack3D" />
+ <description>
+ Sets the modification stack for this skeleton to the passed-in modification stack, [code]modification_stack[/code].
+ </description>
+ </method>
<method name="unparent_bone_and_rest">
<return type="void" />
<argument index="0" name="bone_idx" type="int" />
@@ -227,12 +353,12 @@
Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of its parent prior to being reset.
</description>
</method>
- <method name="world_transform_to_bone_transform">
+ <method name="world_transform_to_global_pose">
<return type="Transform3D" />
<argument index="0" name="world_transform" type="Transform3D" />
<description>
- Takes the given world transform, relative to the [Skeleton3D], and converts it to a bone pose/transform.
- This is useful for using setting bone poses using transforms from [Node3D]-based nodes.
+ Takes the passed-in global transform and converts it to a global pose.
+ This can be used to easily convert a global transform from [member Node3D.global_transform] to a global pose usable with [method set_bone_global_pose_override], for example.
</description>
</method>
</methods>
@@ -241,6 +367,12 @@
</member>
</members>
<signals>
+ <signal name="bone_pose_changed">
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ This signal is emitted when one of the bones in the Skeleton3D node have changed their pose. This is used to inform nodes that rely on bone positions that one of the bones in the Skeleton3D have changed their transform/pose.
+ </description>
+ </signal>
<signal name="pose_updated">
<description>
</description>
diff --git a/doc/classes/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml
new file mode 100644
index 0000000000..48b8a905b9
--- /dev/null
+++ b/doc/classes/SkeletonModification3D.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification3D" inherits="Resource" version="4.0">
+ <brief_description>
+ A resource that operates on bones in a [Skeleton3D].
+ </brief_description>
+ <description>
+ This resource provides an interface that can be expanded so code that operates on bones in a [Skeleton3D] can be mixed and matched together to create complex interactions.
+ This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_execute" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="delta" type="float" />
+ <description>
+ Executes the given modification. This is where the modification performs whatever function it is designed to do.
+ </description>
+ </method>
+ <method name="_setup_modification" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="modification_stack" type="SkeletonModificationStack3D" />
+ <description>
+ Sets up the modification so it can be executed. This function should be called automatically by the [SkeletonModificationStack3D] containing this modification.
+ If you need to initialize a modification before use, this is the place to do it!
+ </description>
+ </method>
+ <method name="clamp_angle">
+ <return type="float" />
+ <argument index="0" name="angle" type="float" />
+ <argument index="1" name="min" type="float" />
+ <argument index="2" name="max" type="float" />
+ <argument index="3" name="invert" type="bool" />
+ <description>
+ Takes a angle and clamps it so it is within the passed-in [code]min[/code] and [code]max[/code] range. [code]invert[/code] will inversely clamp the angle, clamping it to the range outside of the given bounds.
+ </description>
+ </method>
+ <method name="get_is_setup" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether this modification has been successfully setup or not.
+ </description>
+ </method>
+ <method name="get_modification_stack">
+ <return type="SkeletonModificationStack3D" />
+ <description>
+ Returns the [SkeletonModificationStack3D] that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on.
+ </description>
+ </method>
+ <method name="set_is_setup">
+ <return type="void" />
+ <argument index="0" name="is_setup" type="bool" />
+ <description>
+ Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack3D] the modification is bound to should handle setting the modification up.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="true">
+ When true, the modification's [method _execute] function will be called by the [SkeletonModificationStack3D].
+ </member>
+ <member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0">
+ The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml
new file mode 100644
index 0000000000..aa7ddad56e
--- /dev/null
+++ b/doc/classes/SkeletonModification3DCCDIK.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification3DCCDIK" inherits="SkeletonModification3D" version="4.0">
+ <brief_description>
+ A modification that uses CCDIK to manipulate a series of bones to reach a target.
+ </brief_description>
+ <description>
+ This [SkeletonModification3D] uses an algorithm called [b]C[/b]yclic [b]C[/b]oordinate [b]D[/b]escent [b]I[/b]nverse [b]K[/b]inematics, or CCDIK, to maniuplate a chain of bones in a Skeleton so it reaches a defined target.
+ CCDIK works by rotating a set of bones, typically called a "bone chain", on a single axis. Each bone is rotated to face the target from the tip (by default), which over a chain of bones allow it to rotate properly to reach the target. Because the bones only rotate on a single axis, CCDIK [i]can[/i] look more robotic than other IK solvers.
+ [b]Note:[/b] The CCDIK modifier has [code]ccdik_joints[/code], which are the data objects that hold the data for each joint in the CCDIK chain. This is different from a bone! CCDIK joints hold the data needed for each bone in the bone chain used by CCDIK.
+ CCDIK also fully supports angle constraints, allowing for more control over how a solution is met.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_ccdik_joint_bone_index" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the bone index of the bone assigned to the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_bone_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the name of the bone that is assigned to the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_ccdik_axis" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the integer representing the joint axis of the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_constraint_angle_max" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the maximum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle is in degrees!
+ </description>
+ </method>
+ <method name="get_ccdik_joint_constraint_angle_min" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the minimum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle is in degrees!
+ </description>
+ </method>
+ <method name="get_ccdik_joint_constraint_invert" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_invert] for details.
+ </description>
+ </method>
+ <method name="get_ccdik_joint_enable_joint_constraint" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Enables angle constraints to the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_ccdik_joint_bone_index">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="bone_index" type="int" />
+ <description>
+ Sets the bone index, [code]bone_index[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_name[/code] of the CCDIK joint based on data provided by the linked skeleton.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_bone_name">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="bone_name" type="String" />
+ <description>
+ Sets the bone name, [code]bone_name[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the CCDIK joint based on data provided by the linked skeleton.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_ccdik_axis">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="axis" type="int" />
+ <description>
+ Sets the joint axis of the CCDIK joint at [code]joint_idx[/code] to the passed-in joint axis, [code]axis[/code].
+ </description>
+ </method>
+ <method name="set_ccdik_joint_constraint_angle_max">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="max_angle" type="float" />
+ <description>
+ Sets the maximum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle must be in radians!
+ </description>
+ </method>
+ <method name="set_ccdik_joint_constraint_angle_min">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="min_angle" type="float" />
+ <description>
+ Sets the minimum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle must be in radians!
+ </description>
+ </method>
+ <method name="set_ccdik_joint_constraint_invert">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="invert" type="bool" />
+ <description>
+ Sets whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint.
+ An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_enable_joint_constraint">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="enable" type="bool" />
+ <description>
+ Sets whether joint constraints are enabled for the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="ccdik_data_chain_length" type="int" setter="set_ccdik_data_chain_length" getter="get_ccdik_data_chain_length" default="0">
+ The amount of CCDIK joints in the CCDIK modification.
+ </member>
+ <member name="high_quality_solve" type="bool" setter="set_use_high_quality_solve" getter="get_use_high_quality_solve" default="true">
+ When true, the CCDIK algorithm will perform a higher quality solve that returns more natural results. A high quality solve requires more computation power to solve though, and therefore can be disabled to save performance.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the CCDIK modification. This node is what the CCDIK chain will attempt to rotate the bone chain to.
+ </member>
+ <member name="tip_nodepath" type="NodePath" setter="set_tip_node" getter="get_tip_node" default="NodePath(&quot;&quot;)">
+ The end position of the CCDIK chain. Typically, this should be a child of a [BoneAttachment3D] node attached to the final bone in the CCDIK chain, where the child node is offset so it is at the end of the final bone.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification3DFABRIK.xml b/doc/classes/SkeletonModification3DFABRIK.xml
new file mode 100644
index 0000000000..7058e37e94
--- /dev/null
+++ b/doc/classes/SkeletonModification3DFABRIK.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification3DFABRIK" inherits="SkeletonModification3D" version="4.0">
+ <brief_description>
+ A modification that uses FABRIK to manipulate a series of bones to reach a target.
+ </brief_description>
+ <description>
+ This [SkeletonModification3D] uses an algorithm called [b]F[/b]orward [b]A[/b]nd [b]B[/b]ackward [b]R[/b]eaching [b]I[/b]nverse [b]K[/b]inematics, or FABRIK, to rotate a bone chain so that it reaches a target.
+ FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other.
+ Because of how FABRIK works, it often gives more natural results than those seen in [SkeletonModification3DCCDIK], though FABRIK currently does not support joint constraints.
+ [b]Note:[/b] The FABRIK modifier has [code]fabrik_joints[/code], which are the data objects that hold the data for each joint in the FABRIK chain. This is different from a bone! FABRIK joints hold the data needed for each bone in the bone chain used by FABRIK.
+ To help control how the FABRIK joints move, a magnet vector can be passed, which can nudge the bones in a certain direction prior to solving, giving a level of control over the final result.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="fabrik_joint_auto_calculate_length">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Will attempt to automatically calculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_auto_calculate_length" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns a boolean that indiciates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_bone_index" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the bone index of the bone assigned to the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_bone_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the name of the bone that is assigned to the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_length" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the length of the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_magnet" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the magnet vector of the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_tip_node" qualifiers="const">
+ <return type="NodePath" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the [Node3D]-based node placed at the tip of the FABRIK joint at [code]joint_idx[/code], if one has been set.
+ </description>
+ </method>
+ <method name="get_fabrik_joint_use_target_basis" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns a boolean indiciating whether the FABRIK joint uses the target's [Basis] for its rotation.
+ [b]Note:[/b] this option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones.
+ </description>
+ </method>
+ <method name="get_fabrik_joint_use_tip_node" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Sets the [Node3D]-based node that will be used as the tip of the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_fabrik_joint_auto_calculate_length">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="auto_calculate_length" type="bool" />
+ <description>
+ When [code]true[/code], this modification will attempt to automatically calculate the length of the bone for the FABRIK joint at [code]joint_idx[/code]. It does this by either using the tip node assigned, if there is one assigned, or the distance the of the bone's children, if the bone has any. If the bone has no children and no tip node is assigned, then the modification [b]cannot[/b] autocalculate the joint's length. In this case, the joint length should be entered manually or a tip node assigned.
+ </description>
+ </method>
+ <method name="set_fabrik_joint_bone_index">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="bone_index" type="int" />
+ <description>
+ Sets the bone index, [code]bone_index[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_name[/code] of the FABRIK joint based on data provided by the [Skeleton3D].
+ </description>
+ </method>
+ <method name="set_fabrik_joint_bone_name">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="bone_name" type="String" />
+ <description>
+ Sets the bone name, [code]bone_name[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the FABRIK joint based on data provided by the [Skeleton3D].
+ </description>
+ </method>
+ <method name="set_fabrik_joint_length">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="length" type="float" />
+ <description>
+ Sets the joint length, [code]length[/code], of the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_fabrik_joint_magnet">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="magnet_position" type="Vector3" />
+ <description>
+ Sets the magenet position to [code]magnet_position[/code] for the joint at [code]joint_idx[/code]. The magnet position is used to nudge the joint in that direction when solving, which gives some control over how that joint will bend when being solved.
+ </description>
+ </method>
+ <method name="set_fabrik_joint_tip_node">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="tip_node" type="NodePath" />
+ <description>
+ Sets the nodepath of the FARIK joint at [code]joint_idx[/code] to [code]tip_node[/code]. The tip node is used to calculate the length of the FABRIK joint when set to automatically calculate joint length.
+ [b]Note:[/b] The tip node should generally be a child node of a [BoneAttachment3D] node attached to the bone that this FABRIK joint operates on, with the child node being offset so it is at the end of the bone.
+ </description>
+ </method>
+ <method name="set_fabrik_joint_use_target_basis">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="use_target_basis" type="bool" />
+ <description>
+ Sets whether the FABRIK joint at [code]joint_idx[/code] uses the target's [Basis] for its rotation.
+ [b]Note:[/b] this option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones.
+ </description>
+ </method>
+ <method name="set_fabrik_joint_use_tip_node">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="use_tip_node" type="bool" />
+ <description>
+ Sets whether the tip node should be used when autocalculating the joint length for the FABRIK joint at [code]joint_idx[/code]. This will only work if there is a node assigned to the tip nodepath for this joint.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="chain_max_iterations" type="int" setter="set_chain_max_iterations" getter="get_chain_max_iterations" default="10">
+ The number of times FABRIK will try to solve each time the [code]execute[/code] function is called. Setting this value to a lower number will be result in better performance, but this can also result in harsher movements and slower solves.
+ </member>
+ <member name="chain_tolerance" type="float" setter="set_chain_tolerance" getter="get_chain_tolerance" default="0.01">
+ The minimum distance the target has to be from the tip of the final bone in the bone chain. Setting this value to a higher number allows for greater performance, but less accurate solves.
+ </member>
+ <member name="fabrik_data_chain_length" type="int" setter="set_fabrik_data_chain_length" getter="get_fabrik_data_chain_length" default="0">
+ The amount of FABRIK joints in the FABRIK modification.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the FABRIK modification. This node is what the FABRIK chain will attempt to rotate the bone chain to.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification3DJiggle.xml b/doc/classes/SkeletonModification3DJiggle.xml
new file mode 100644
index 0000000000..e48e382cd4
--- /dev/null
+++ b/doc/classes/SkeletonModification3DJiggle.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification3DJiggle" inherits="SkeletonModification3D" version="4.0">
+ <brief_description>
+ A modification that jiggles bones 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 a bone! Jiggle joints hold the data needed for each bone in the bone chain used by the Jiggle modification.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_collision_mask" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the collision mask that the Jiggle modifier will take into account when performing physics calculations.
+ </description>
+ </method>
+ <method name="get_jiggle_joint_bone_index" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the bone index of the bone assigned to the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_bone_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the name of the bone that is assigned to the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_damping" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the amount of dampening of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_gravity" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns a [Vector3] representign the amount of gravity the Jiggle joint at [code]joint_idx[/code] is influenced by.
+ </description>
+ </method>
+ <method name="get_jiggle_joint_mass" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the amount of mass of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_override" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is overriding the default jiggle joint data defined in the modification.
+ </description>
+ </method>
+ <method name="get_jiggle_joint_roll" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the amount of roll/twist applied to the bone that the Jiggle joint is applied to.
+ </description>
+ </method>
+ <method name="get_jiggle_joint_stiffness" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns the stiffness of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_use_gravity" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="joint_idx" type="int" />
+ <description>
+ Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is using gravity or not.
+ </description>
+ </method>
+ <method name="get_use_colliders" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether the Jiggle modifier is taking physics colliders into account when solving.
+ </description>
+ </method>
+ <method name="set_collision_mask">
+ <return type="void" />
+ <argument index="0" name="mask" type="int" />
+ <description>
+ Sets the collision mask that the Jiggle modifier takes into account when performing physics calculations.
+ </description>
+ </method>
+ <method name="set_jiggle_joint_bone_index">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="bone_idx" type="int" />
+ <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]bone_name[/code] of the Jiggle joint based on data provided by the [Skeleton3D].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_bone_name">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="name" type="String" />
+ <description>
+ Sets the bone name, [code]bone_name[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the Jiggle joint based on data provided by the [Skeleton3D].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_damping">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="damping" type="float" />
+ <description>
+ Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_gravity">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="gravity" type="Vector3" />
+ <description>
+ Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_mass">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="mass" type="float" />
+ <description>
+ Sets the of mass of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_override">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="override" type="bool" />
+ <description>
+ Sets whether the Jiggle joint at [code]joint_idx[/code] 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.
+ </description>
+ </method>
+ <method name="set_jiggle_joint_roll">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="roll" type="float" />
+ <description>
+ Sets the amount of roll/twist on the bone the Jiggle joint is attached to.
+ </description>
+ </method>
+ <method name="set_jiggle_joint_stiffness">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="stiffness" type="float" />
+ <description>
+ Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_use_gravity">
+ <return type="void" />
+ <argument index="0" name="joint_idx" type="int" />
+ <argument index="1" name="use_gravity" type="bool" />
+ <description>
+ Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity.
+ </description>
+ </method>
+ <method name="set_use_colliders">
+ <return type="void" />
+ <argument index="0" name="use_colliders" type="bool" />
+ <description>
+ When [code]true[/code], the Jiggle modifier will use raycasting to prevent the Jiggle joints from rotating themselves into collision objects when solving.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.75">
+ 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.
+ </member>
+ <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -6, 0)">
+ The default amount of gravity applied to the Jiggle joints, if they are not overriden.
+ </member>
+ <member name="jiggle_data_chain_length" type="int" setter="set_jiggle_data_chain_length" getter="get_jiggle_data_chain_length" default="0">
+ The amount of Jiggle joints in the Jiggle modification.
+ </member>
+ <member name="mass" type="float" setter="set_mass" getter="get_mass" default="0.75">
+ The default amount of mass assigned to the Jiggle joints, if they are not overriden. Higher values lead to faster movements and more overshooting.
+ </member>
+ <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness" default="3.0">
+ 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.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ 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.
+ </member>
+ <member name="use_gravity" type="bool" setter="set_use_gravity" getter="get_use_gravity" default="false">
+ Whether the gravity vector, [member gravity], should be applied to the Jiggle joints, assuming they are not overriding the default settings.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification3DLookAt.xml b/doc/classes/SkeletonModification3DLookAt.xml
new file mode 100644
index 0000000000..c01d764cff
--- /dev/null
+++ b/doc/classes/SkeletonModification3DLookAt.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification3DLookAt" inherits="SkeletonModification3D" version="4.0">
+ <brief_description>
+ A modification that rotates a bone to look at a target.
+ </brief_description>
+ <description>
+ This [SkeletonModification3D] rotates a bone to look a target. This is extremely helpful for moving character's heads to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_additional_rotation" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the amount of extra rotation that is applied to the bone after the LookAt modification executes.
+ </description>
+ </method>
+ <method name="get_lock_rotation_plane" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the plane that the LookAt modification is limiting rotation to.
+ </description>
+ </method>
+ <method name="get_lock_rotation_to_plane" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether the LookAt modification is limiting rotation to a single plane in 3D space.
+ </description>
+ </method>
+ <method name="set_additional_rotation">
+ <return type="void" />
+ <argument index="0" name="additional_rotation" type="Vector3" />
+ <description>
+ Sets the amount of extra rotation to be applied after the LookAt modification executes. This allows you to adjust the finished result.
+ </description>
+ </method>
+ <method name="set_lock_rotation_plane">
+ <return type="void" />
+ <argument index="0" name="plane" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="set_lock_rotation_to_plane">
+ <return type="void" />
+ <argument index="0" name="lock_to_plane" type="bool" />
+ <description>
+ When [code]true[/code], the LookAt modification will limit its rotation to a single plane in 3D space. The plane used can be configured using the [code]set_lock_rotation_plane[/code] function.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bone_index" type="int" setter="set_bone_index" getter="get_bone_index" default="-2">
+ The bone index of the bone that should be operated on by this modification.
+ When possible, this will also update the [member bone_name] based on data provided by the [Skeleton3D].
+ </member>
+ <member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name" default="&quot;&quot;">
+ The name of the bone that should be operated on by this modification.
+ When possible, this will also update the [member bone_index] based on data provided by the [Skeleton3D].
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the modification.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification3DStackHolder.xml b/doc/classes/SkeletonModification3DStackHolder.xml
new file mode 100644
index 0000000000..bb923b680d
--- /dev/null
+++ b/doc/classes/SkeletonModification3DStackHolder.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification3DStackHolder" inherits="SkeletonModification3D" version="4.0">
+ <brief_description>
+ A modification that holds and executes a [SkeletonModificationStack3D].
+ </brief_description>
+ <description>
+ This [SkeletonModification3D] holds a reference to a [SkeletonModificationStack3D], allowing you to use multiple modification stacks on a single [Skeleton3D].
+ [b]Note[/b]: The modifications in the held [SkeletonModificationStack3D] will only be executed if their execution mode matches the execution mode of the SkeletonModification3DStackHolder.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_held_modification_stack" qualifiers="const">
+ <return type="SkeletonModificationStack3D" />
+ <description>
+ Returns the [SkeletonModificationStack3D] that this modification is holding.
+ </description>
+ </method>
+ <method name="set_held_modification_stack">
+ <return type="void" />
+ <argument index="0" name="held_modification_stack" type="SkeletonModificationStack3D" />
+ <description>
+ Sets the [SkeletonModificationStack3D] that this modification is holding. This modification stack will then be executed when this modification is executed.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml
new file mode 100644
index 0000000000..5c863367df
--- /dev/null
+++ b/doc/classes/SkeletonModification3DTwoBoneIK.xml
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification3DTwoBoneIK" inherits="SkeletonModification3D" version="4.0">
+ <brief_description>
+ A modification that moves two bones to reach the target.
+ </brief_description>
+ <description>
+ This [SkeletonModification3D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three verticies of the triangle. Because the algorithm works by making a triangle, it can only opperate on two bones.
+ TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification3DFABRIK], but gives similar, natural looking results.
+ A [Node3D]-based node can be used to define the pole, or bend direction, allowing control over which direction the joint takes when bending to reach the target when the target is within reach.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_auto_calculate_joint_length" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether the TwoBoneIK modification will attempt to autocalculate the lengths of the two bones.
+ </description>
+ </method>
+ <method name="get_joint_one_bone_idx" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the bone index of the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_one_bone_name" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the name of the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_one_length" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the length of the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_one_roll" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the amount of roll/twist applied to the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_two_bone_idx" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the bone index of the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_two_bone_name" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the name of the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_two_length" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the length of the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_two_roll" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the amount of roll/twist applied to the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_pole_node" qualifiers="const">
+ <return type="NodePath" />
+ <description>
+ Returns the node that is being used as the pole node for the TwoBoneIK modification, if a pole node has been set.
+ </description>
+ </method>
+ <method name="get_tip_node" qualifiers="const">
+ <return type="NodePath" />
+ <description>
+ Returns the node that is being used to calculate the tip position of the second bone in the TwoBoneIK modification, if a tip node has been set.
+ </description>
+ </method>
+ <method name="get_use_pole_node" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether the TwoBoneIK modification will attempt to use the pole node to figure out which direction to bend, if a pole node has been set.
+ </description>
+ </method>
+ <method name="get_use_tip_node" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether the TwoBoneIK modification will attempt to use the tip node to figure out the length and position of the tip of the second bone.
+ </description>
+ </method>
+ <method name="set_auto_calculate_joint_length">
+ <return type="void" />
+ <argument index="0" name="auto_calculate_joint_length" type="bool" />
+ <description>
+ If true, the TwoBoneIK modification will attempt to autocalculate the lengths of the bones being used. The first bone will be calculated by using the distance from the origin of the first bone to the origin of the second bone.
+ The second bone will be calculated either using the tip node if that setting is enabled, or by using the distances of the second bone's children. If the tip node is not enabled and the bone has no children, then the length cannot be autocalculated. In this case, the length will either have to be manually inputted or a tip node used to calculate the length.
+ </description>
+ </method>
+ <method name="set_joint_one_bone_idx">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Sets the bone index, [code]bone_index[/code], of the first bone. When possible, this will also update the [code]bone_name[/code] of the first bone based on data provided by the [Skeleton3D].
+ </description>
+ </method>
+ <method name="set_joint_one_bone_name">
+ <return type="void" />
+ <argument index="0" name="bone_name" type="String" />
+ <description>
+ Sets the bone name, [code]bone_name[/code], of the first bone. When possible, this will also update the [code]bone_index[/code] of the first bone based on data provided by the [Skeleton3D].
+ </description>
+ </method>
+ <method name="set_joint_one_length">
+ <return type="void" />
+ <argument index="0" name="bone_length" type="float" />
+ <description>
+ Sets the length of the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_one_roll">
+ <return type="void" />
+ <argument index="0" name="roll" type="float" />
+ <description>
+ Sets the amount of roll/twist applied to the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_two_bone_idx">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ Sets the bone index, [code]bone_index[/code], of the second bone. When possible, this will also update the [code]bone_name[/code] of the second bone based on data provided by the [Skeleton3D].
+ </description>
+ </method>
+ <method name="set_joint_two_bone_name">
+ <return type="void" />
+ <argument index="0" name="bone_name" type="String" />
+ <description>
+ Sets the bone name, [code]bone_name[/code], of the second bone. When possible, this will also update the [code]bone_index[/code] of the second bone based on data provided by the [Skeleton3D].
+ </description>
+ </method>
+ <method name="set_joint_two_length">
+ <return type="void" />
+ <argument index="0" name="bone_length" type="float" />
+ <description>
+ Sets the length of the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_two_roll">
+ <return type="void" />
+ <argument index="0" name="roll" type="float" />
+ <description>
+ Sets the amount of roll/twist applied to the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_pole_node">
+ <return type="void" />
+ <argument index="0" name="pole_nodepath" type="NodePath" />
+ <description>
+ Sets the node to be used as the for the pole of the TwoBoneIK. When a node is set and the modification is set to use the pole node, the TwoBoneIK modification will bend the nodes in the direction towards this node when the bones need to bend.
+ </description>
+ </method>
+ <method name="set_tip_node">
+ <return type="void" />
+ <argument index="0" name="tip_nodepath" type="NodePath" />
+ <description>
+ Sets the node to be used as the tip for the second bone. This is used to calculate the length and position of the end of the second bone in the TwoBoneIK modification.
+ [b]Note:[/b] The tip node should generally be a child node of a [BoneAttachment3D] node attached to the second bone, with the child node being offset so it is at the end of the bone.
+ </description>
+ </method>
+ <method name="set_use_pole_node">
+ <return type="void" />
+ <argument index="0" name="use_pole_node" type="bool" />
+ <description>
+ When [code]true[/code], the TwoBoneIK modification will bend the bones towards the pole node, if one has been set. This gives control over the direction the TwoBoneIK solver will bend, which is helpful for joints like elbows that only bend in certain directions.
+ </description>
+ </method>
+ <method name="set_use_tip_node">
+ <return type="void" />
+ <argument index="0" name="use_tip_node" type="bool" />
+ <description>
+ When [code]true[/code], the TwoBoneIK modification will use the tip node to calculate the distance and position of the end/tip of the second bone. This is the most stable solution for knowing the tip position and length of the second bone.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will attempt to rotate the bones to reach.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml
new file mode 100644
index 0000000000..4e5e9d72d8
--- /dev/null
+++ b/doc/classes/SkeletonModificationStack3D.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModificationStack3D" inherits="Resource" version="4.0">
+ <brief_description>
+ A resource that holds a stack of [SkeletonModification3D]s.
+ </brief_description>
+ <description>
+ This resource is used by the Skeleton and holds a stack of [SkeletonModification3D]s. The SkeletonModificationStack3D controls the order of the modifications, which controls how they are applied. Modification order is especially important for full-body IK setups, as you need to execute the modifications in the correct order to get the desired results. For example, you want to execute a modification on the spine [i]before[/i] the arms on a humanoid skeleton.
+ Additionally, the SkeletonModificationStack3D also controls how strongly the modifications are applied to the [Skeleton3D] node.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_modification">
+ <return type="void" />
+ <argument index="0" name="modification" type="SkeletonModification3D" />
+ <description>
+ Adds the passed-in [SkeletonModification3D] to the stack.
+ </description>
+ </method>
+ <method name="delete_modification">
+ <return type="void" />
+ <argument index="0" name="mod_idx" type="int" />
+ <description>
+ Deletes the [SkeletonModification3D] at the index position [code]mod_idx[/code], if it exists.
+ </description>
+ </method>
+ <method name="enable_all_modifications">
+ <return type="void" />
+ <argument index="0" name="enabled" type="bool" />
+ <description>
+ Enables all [SkeletonModification3D]s in the stack.
+ </description>
+ </method>
+ <method name="execute">
+ <return type="void" />
+ <argument index="0" name="delta" type="float" />
+ <argument index="1" name="execution_mode" type="int" />
+ <description>
+ Executes all of the [SkeletonModification3D]s in the stack that use the same execution mode as the passed-in [code]execution_mode[/code], starting from index [code]0[/code] to [member modification_count].
+ [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results.
+ </description>
+ </method>
+ <method name="get_is_setup" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns a boolean that indiciates whether the modification stack is setup and can execute.
+ </description>
+ </method>
+ <method name="get_modification" qualifiers="const">
+ <return type="SkeletonModification3D" />
+ <argument index="0" name="mod_idx" type="int" />
+ <description>
+ Returns the [SkeletonModification3D] at the passed-in index, [code]mod_idx[/code].
+ </description>
+ </method>
+ <method name="get_skeleton" qualifiers="const">
+ <return type="Skeleton3D" />
+ <description>
+ Returns the [Skeleton3D] node that the SkeletonModificationStack3D is bound to.
+ </description>
+ </method>
+ <method name="set_modification">
+ <return type="void" />
+ <argument index="0" name="mod_idx" type="int" />
+ <argument index="1" name="modification" type="SkeletonModification3D" />
+ <description>
+ Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code].
+ </description>
+ </method>
+ <method name="setup">
+ <return type="void" />
+ <description>
+ Sets up the modification stack so it can execute. This function should be called by [Skeleton3D] and shouldn't be called unless you know what you are doing.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="false">
+ When true, the modification's in the stack will be called. This is handled automatically through the [Skeleton3D] node.
+ </member>
+ <member name="modification_count" type="int" setter="set_modification_count" getter="get_modification_count" default="0">
+ The amount of modifications in the stack.
+ </member>
+ <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0">
+ The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the skeleton bone poses.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>