A node that propagates and disperses the child bone's twist to the parent bones.
This [BoneTwistDisperser3D] allows for smooth twist interpolation between multiple bones by dispersing the end bone's twist to the parents. This only changes the twist without changing the global position of each joint. This is useful for smoothly twisting bones in combination with [CopyTransformModifier3D] and IK. [b]Note:[/b] If an extracted twist is greater than 180 degrees, flipping occurs. This is similar to [ConvertTransformModifier3D]. [b]Note:[/b] Most methods in this class take an [code]index[/code] parameter. This parameter specifies which setting list entry to return if the IK has multiple entries (e.g. [code]settings/<index>/root_bone_name[/code]).
Clears all settings.
Returns the damping curve when [method get_disperse_mode] is [constant DISPERSE_MODE_CUSTOM].
Returns whether to use automatic amount assignment or to allow manual assignment.
Returns the end bone index of the bone chain.
Returns the tail direction of the end bone of the bone chain when [method is_end_bone_extended] is [code]true[/code].
Returns the end bone name of the bone chain.
Returns the bone index at [param joint] in the bone chain's joint list.
Returns the bone name at [param joint] in the bone chain's joint list.
Returns the joint count of the bone chain's joint list.
Returns the twist amount at [param joint] in the bone chain's joint list when [method get_disperse_mode] is [constant DISPERSE_MODE_CUSTOM].
Returns the reference bone to extract twist of the setting at [param index]. This bone is either the end of the chain or its parent, depending on [method is_end_bone_extended].
Returns the reference bone name to extract twist of the setting at [param index]. This bone is either the end of the chain or its parent, depending on [method is_end_bone_extended].
Returns the root bone index of the bone chain.
Returns the root bone name of the bone chain.
Returns the rotation to an arbitrary state before twisting for the current bone pose to extract the twist when [method is_twist_from_rest] is [code]false[/code].
Returns the position at which to divide the segment between joints for weight assignment when [method get_disperse_mode] is [constant DISPERSE_MODE_WEIGHTED].
Returns [code]true[/code] if the end bone is extended to have a tail.
Returns [code]true[/code] if extracting the twist amount from the difference between the bone rest and the current bone pose.
Sets the damping curve when [method get_disperse_mode] is [constant DISPERSE_MODE_CUSTOM].
Sets whether to use automatic amount assignment or to allow manual assignment.
Sets the end bone index of the bone chain.
Sets the end bone tail direction of the bone chain when [method is_end_bone_extended] is [code]true[/code].
Sets the end bone name of the bone chain. [b]Note:[/b] The end bone must be a child of the root bone.
If [param enabled] is [code]true[/code], the end bone is extended to have a tail. If [param enabled] is [code]false[/code], [method get_reference_bone] becomes a parent of the end bone and it uses the vector to the end bone as a twist axis.
Sets the twist amount at [param joint] in the bone chain's joint list when [method get_disperse_mode] is [constant DISPERSE_MODE_CUSTOM].
Sets the root bone index of the bone chain.
Sets the root bone name of the bone chain.
Sets the rotation to an arbitrary state before twisting for the current bone pose to extract the twist when [method is_twist_from_rest] is [code]false[/code]. In other words, by calling [method set_twist_from] by [signal SkeletonModifier3D.modification_processed] of a specific [SkeletonModifier3D], you can extract only the twists generated by modifiers processed after that but before this [BoneTwistDisperser3D].
If [param enabled] is [code]true[/code], it extracts the twist amount from the difference between the bone rest and the current bone pose. If [param enabled] is [code]false[/code], it extracts the twist amount from the difference between [method get_twist_from] and the current bone pose. See also [method set_twist_from].
Sets the position at which to divide the segment between joints for weight assignment when [method get_disperse_mode] is [constant DISPERSE_MODE_WEIGHTED]. For example, when [param weight_position] is [code]0.5[/code], if two bone segments with a length of [code]1.0[/code] exist between three joints, weights are assigned to each joint from root to end at ratios of [code]0.5[/code], [code]1.0[/code], and [code]0.5[/code]. Then amounts become [code]0.25[/code], [code]0.75[/code], and [code]1.0[/code] respectively.
- If [code]true[/code], the solver retrieves the bone axis from the bone pose every frame. If [code]false[/code], the solver retrieves the bone axis from the bone rest and caches it.
- The number of settings.
Assign amounts so that they monotonically increase from [code]0.0[/code] to [code]1.0[/code], ensuring all weights are equal. For example, with five joints, the amounts would be [code]0.2[/code], [code]0.4[/code], [code]0.6[/code], [code]0.8[/code], and [code]1.0[/code] starting from the root bone.
Assign amounts so that they monotonically increase from [code]0.0[/code] to [code]1.0[/code], based on the length of the bones between joint segments. See also [method set_weight_position].
You can assign arbitrary amounts to the joint list. See also [method set_joint_twist_amount]. When [method is_end_bone_extended] is [code]false[/code], a child of the reference bone exists solely to determine the twist axis, so its custom amount has absolutely no effect at all.