reckfellENGINE

BoneTwistDisperser3D

A node that propagates and disperses the child bone's twist to the parent bones.

On this page
class BoneTwistDisperser3DReckfellSharpInherits SkeletonModifier3D

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. Note: If an extracted twist is greater than 180 degrees, flipping occurs. This is similar to ConvertTransformModifier3D. Note: Most methods in this class take an index parameter. This parameter specifies which setting list entry to return if the IK has multiple entries (e.g. settings/<index>/root_bone_name).

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

BoneTwistDisperser3DConstructor
# BoneTwistDisperser3D
C#
public BoneTwistDisperser3D();

Properties2

MutableBoneAxesProperty
# MutableBoneAxes
C#
public bool MutableBoneAxes { get; set; }

If true, the solver retrieves the bone axis from the bone pose every frame. If false, the solver retrieves the bone axis from the bone rest and caches it.

SettingCountProperty
# SettingCount
C#
public int SettingCount { get; set; }

The number of settings.

Methods34

AreBoneAxesMutablebool
# AreBoneAxesMutable
C#
public bool AreBoneAxesMutable();
Returns bool
ClearSettingsvoid
# ClearSettings
C#
public void ClearSettings();

Clears all settings.

GetDampingCurveCurve
# GetDampingCurve
C#
public Curve GetDampingCurve(int index);

Returns the damping curve when BoneTwistDisperser3D.GetDisperseMode is BoneTwistDisperser3D.DisperseMode.Custom.

Parameters
NameTypeDefault
indexint—
Returns Curve
GetDisperseModeBoneTwistDisperser3D.DisperseMode
# GetDisperseMode
C#
public BoneTwistDisperser3D.DisperseMode GetDisperseMode(int index);

Returns whether to use automatic amount assignment or to allow manual assignment.

Parameters
NameTypeDefault
indexint—
Returns BoneTwistDisperser3D.DisperseMode
GetEndBoneint
# GetEndBone
C#
public int GetEndBone(int index);

Returns the end bone index of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns int
GetEndBoneDirectionSkeletonModifier3D.BoneDirection
# GetEndBoneDirection
C#
public SkeletonModifier3D.BoneDirection GetEndBoneDirection(int index);

Returns the tail direction of the end bone of the bone chain when BoneTwistDisperser3D.IsEndBoneExtended is true.

Parameters
NameTypeDefault
indexint—
Returns SkeletonModifier3D.BoneDirection
GetEndBoneNamestring
# GetEndBoneName
C#
public string GetEndBoneName(int index);

Returns the end bone name of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns string
GetJointBoneint
# GetJointBone
C#
public int GetJointBone(int index, int joint);

Returns the bone index at joint in the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
jointint—
Returns int
GetJointBoneNamestring
# GetJointBoneName
C#
public string GetJointBoneName(int index, int joint);

Returns the bone name at joint in the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
jointint—
Returns string
GetJointCountint
# GetJointCount
C#
public int GetJointCount(int index);

Returns the joint count of the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
Returns int
GetJointTwistAmountfloat
# GetJointTwistAmount
C#
public float GetJointTwistAmount(int index, int joint);

Returns the twist amount at joint in the bone chain's joint list when BoneTwistDisperser3D.GetDisperseMode is BoneTwistDisperser3D.DisperseMode.Custom.

Parameters
NameTypeDefault
indexint—
jointint—
Returns float
GetReferenceBoneint
# GetReferenceBone
C#
public int GetReferenceBone(int index);

Returns the reference bone to extract twist of the setting at index. This bone is either the end of the chain or its parent, depending on BoneTwistDisperser3D.IsEndBoneExtended.

Parameters
NameTypeDefault
indexint—
Returns int
GetReferenceBoneNamestring
# GetReferenceBoneName
C#
public string GetReferenceBoneName(int index);

Returns the reference bone name to extract twist of the setting at index. This bone is either the end of the chain or its parent, depending on BoneTwistDisperser3D.IsEndBoneExtended.

Parameters
NameTypeDefault
indexint—
Returns string
GetRootBoneint
# GetRootBone
C#
public int GetRootBone(int index);

Returns the root bone index of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns int
GetRootBoneNamestring
# GetRootBoneName
C#
public string GetRootBoneName(int index);

Returns the root bone name of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns string
GetSettingCountint
# GetSettingCount
C#
public int GetSettingCount();
Returns int
GetTwistFromQuaternion
# GetTwistFrom
C#
public Quaternion GetTwistFrom(int index);

Returns the rotation to an arbitrary state before twisting for the current bone pose to extract the twist when BoneTwistDisperser3D.IsTwistFromRest is false.

Parameters
NameTypeDefault
indexint—
Returns Quaternion
GetWeightPositionfloat
# GetWeightPosition
C#
public float GetWeightPosition(int index);

Returns the position at which to divide the segment between joints for weight assignment when BoneTwistDisperser3D.GetDisperseMode is BoneTwistDisperser3D.DisperseMode.Weighted.

Parameters
NameTypeDefault
indexint—
Returns float
IsEndBoneExtendedbool
# IsEndBoneExtended
C#
public bool IsEndBoneExtended(int index);

Returns true if the end bone is extended to have a tail.

Parameters
NameTypeDefault
indexint—
Returns bool
IsTwistFromRestbool
# IsTwistFromRest
C#
public bool IsTwistFromRest(int index);

Returns true if extracting the twist amount from the difference between the bone rest and the current bone pose.

Parameters
NameTypeDefault
indexint—
Returns bool
SetDampingCurvevoid
# SetDampingCurve
C#
public void SetDampingCurve(int index, Curve curve);

Sets the damping curve when BoneTwistDisperser3D.GetDisperseMode is BoneTwistDisperser3D.DisperseMode.Custom.

Parameters
NameTypeDefault
indexint—
curveCurve—
SetDisperseModevoid
# SetDisperseMode
C#
public void SetDisperseMode(int index, BoneTwistDisperser3D.DisperseMode disperseMode);

Sets whether to use automatic amount assignment or to allow manual assignment.

Parameters
NameTypeDefault
indexint—
disperseModeBoneTwistDisperser3D.DisperseMode—
SetEndBonevoid
# SetEndBone
C#
public void SetEndBone(int index, int bone);

Sets the end bone index of the bone chain.

Parameters
NameTypeDefault
indexint—
boneint—
SetEndBoneDirectionvoid
# SetEndBoneDirection
C#
public void SetEndBoneDirection(int index, SkeletonModifier3D.BoneDirection boneDirection);

Sets the end bone tail direction of the bone chain when BoneTwistDisperser3D.IsEndBoneExtended is true.

Parameters
NameTypeDefault
indexint—
boneDirectionSkeletonModifier3D.BoneDirection—
SetEndBoneNamevoid
# SetEndBoneName
C#
public void SetEndBoneName(int index, string boneName);

Sets the end bone name of the bone chain. Note: The end bone must be a child of the root bone.

Parameters
NameTypeDefault
indexint—
boneNamestring—
SetExtendEndBonevoid
# SetExtendEndBone
C#
public void SetExtendEndBone(int index, bool enabled);

If enabled is true, the end bone is extended to have a tail. If enabled is false, BoneTwistDisperser3D.GetReferenceBone becomes a parent of the end bone and it uses the vector to the end bone as a twist axis.

Parameters
NameTypeDefault
indexint—
enabledbool—
SetJointTwistAmountvoid
# SetJointTwistAmount
C#
public void SetJointTwistAmount(int index, int joint, float twistAmount);

Sets the twist amount at joint in the bone chain's joint list when BoneTwistDisperser3D.GetDisperseMode is BoneTwistDisperser3D.DisperseMode.Custom.

Parameters
NameTypeDefault
indexint—
jointint—
twistAmountfloat—
SetMutableBoneAxesvoid
# SetMutableBoneAxes
C#
public void SetMutableBoneAxes(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetRootBonevoid
# SetRootBone
C#
public void SetRootBone(int index, int bone);

Sets the root bone index of the bone chain.

Parameters
NameTypeDefault
indexint—
boneint—
SetRootBoneNamevoid
# SetRootBoneName
C#
public void SetRootBoneName(int index, string boneName);

Sets the root bone name of the bone chain.

Parameters
NameTypeDefault
indexint—
boneNamestring—
SetSettingCountvoid
# SetSettingCount
C#
public void SetSettingCount(int count);
Parameters
NameTypeDefault
countint—
SetTwistFromvoid
# SetTwistFrom
C#
public void SetTwistFrom(int index, Quaternion from);

Sets the rotation to an arbitrary state before twisting for the current bone pose to extract the twist when BoneTwistDisperser3D.IsTwistFromRest is false. In other words, by calling BoneTwistDisperser3D.SetTwistFrom by SkeletonModifier3D.ModificationProcessed of a specific SkeletonModifier3D, you can extract only the twists generated by modifiers processed after that but before this BoneTwistDisperser3D.

Parameters
NameTypeDefault
indexint—
fromQuaternion—
SetTwistFromRestvoid
# SetTwistFromRest
C#
public void SetTwistFromRest(int index, bool enabled);

If enabled is true, it extracts the twist amount from the difference between the bone rest and the current bone pose. If enabled is false, it extracts the twist amount from the difference between BoneTwistDisperser3D.GetTwistFrom and the current bone pose. See also BoneTwistDisperser3D.SetTwistFrom.

Parameters
NameTypeDefault
indexint—
enabledbool—
SetWeightPositionvoid
# SetWeightPosition
C#
public void SetWeightPosition(int index, float weightPosition);

Sets the position at which to divide the segment between joints for weight assignment when BoneTwistDisperser3D.GetDisperseMode is BoneTwistDisperser3D.DisperseMode.Weighted. For example, when weight_position is 0.5, if two bone segments with a length of 1.0 exist between three joints, weights are assigned to each joint from root to end at ratios of 0.5, 1.0, and 0.5. Then amounts become 0.25, 0.75, and 1.0 respectively.

Parameters
NameTypeDefault
indexint—
weightPositionfloat—

BoneTwistDisperser3D.DisperseMode

ValueDescription
Custom = 2

You can assign arbitrary amounts to the joint list. See also BoneTwistDisperser3D.SetJointTwistAmount. When BoneTwistDisperser3D.IsEndBoneExtended is false, a child of the reference bone exists solely to determine the twist axis, so its custom amount has absolutely no effect at all.

Even = 0

Assign amounts so that they monotonically increase from 0.0 to 1.0, ensuring all weights are equal. For example, with five joints, the amounts would be 0.2, 0.4, 0.6, 0.8, and 1.0 starting from the root bone.

Weighted = 1

Assign amounts so that they monotonically increase from 0.0 to 1.0, based on the length of the bones between joint segments. See also BoneTwistDisperser3D.SetWeightPosition.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.