reckfellENGINE

TwoBoneIK3D

Rotation based intersection of two circles inverse kinematics solver.

On this page
class TwoBoneIK3DReckfellSharpInherits IKModifier3D

Rotation based intersection of two circles inverse kinematics solver.

This IKModifier3D requires a pole target. It provides deterministic results by constructing a plane from each joint and pole target and finding the intersection of two circles (disks in 3D). This IK can handle twist by setting the pole direction. If there are more than one bone between each set bone, their rotations are ignored, and the straight line connecting the root-middle and middle-end joints are treated as virtual bones. Note: All the 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

TwoBoneIK3DConstructor
# TwoBoneIK3D
C#
public TwoBoneIK3D();

Properties1

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

The number of settings.

Methods28

GetEndBoneint
# GetEndBone
C#
public int GetEndBone(int index);

Returns the end bone index.

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

Returns the end bone's tail direction when TwoBoneIK3D.IsEndBoneExtended is true.

Parameters
NameTypeDefault
indexint—
Returns SkeletonModifier3D.BoneDirection
GetEndBoneLengthfloat
# GetEndBoneLength
C#
public float GetEndBoneLength(int index);

Returns the end bone tail length of the bone chain when TwoBoneIK3D.IsEndBoneExtended is true.

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

Returns the end bone name.

Parameters
NameTypeDefault
indexint—
Returns string
GetMiddleBoneint
# GetMiddleBone
C#
public int GetMiddleBone(int index);

Returns the middle bone index.

Parameters
NameTypeDefault
indexint—
Returns int
GetMiddleBoneNamestring
# GetMiddleBoneName
C#
public string GetMiddleBoneName(int index);

Returns the middle bone name.

Parameters
NameTypeDefault
indexint—
Returns string
GetPoleDirectionSkeletonModifier3D.SecondaryDirection
# GetPoleDirection
C#
public SkeletonModifier3D.SecondaryDirection GetPoleDirection(int index);

Returns the pole direction.

Parameters
NameTypeDefault
indexint—
Returns SkeletonModifier3D.SecondaryDirection
GetPoleDirectionVectorVector3
# GetPoleDirectionVector
C#
public Vector3 GetPoleDirectionVector(int index);

Returns the pole direction vector. If TwoBoneIK3D.GetPoleDirection is SkeletonModifier3D.SecondaryDirection.None, this method returns Vector3(0, 0, 0).

Parameters
NameTypeDefault
indexint—
Returns Vector3
GetPoleEntityEntityPath
# GetPoleEntity
C#
public EntityPath GetPoleEntity(int index);

Returns the pole target node that constructs a plane which the joints are all on and the pole is trying to direct.

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

Returns the root bone index.

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

Returns the root bone name.

Parameters
NameTypeDefault
indexint—
Returns string
GetTargetEntityEntityPath
# GetTargetEntity
C#
public EntityPath GetTargetEntity(int index);

Returns the target node that the end bone is trying to reach.

Parameters
NameTypeDefault
indexint—
Returns EntityPath
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
IsUsingVirtualEndbool
# IsUsingVirtualEnd
C#
public bool IsUsingVirtualEnd(int index);

Returns true if the end bone is extended from the middle bone as a virtual bone.

Parameters
NameTypeDefault
indexint—
Returns bool
SetEndBonevoid
# SetEndBone
C#
public void SetEndBone(int index, int bone);

Sets the end bone index.

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

Sets the end bone tail direction when TwoBoneIK3D.IsEndBoneExtended is true.

Parameters
NameTypeDefault
indexint—
boneDirectionSkeletonModifier3D.BoneDirection—
SetEndBoneLengthvoid
# SetEndBoneLength
C#
public void SetEndBoneLength(int index, float length);

Sets the end bone tail length when TwoBoneIK3D.IsEndBoneExtended is true.

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

Sets the end bone name. Note: The end bone must be a child of the middle 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.

Parameters
NameTypeDefault
indexint—
enabledbool—
SetMiddleBonevoid
# SetMiddleBone
C#
public void SetMiddleBone(int index, int bone);

Sets the middle bone index.

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

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

Parameters
NameTypeDefault
indexint—
boneNamestring—
SetPoleDirectionvoid
# SetPoleDirection
C#
public void SetPoleDirection(int index, SkeletonModifier3D.SecondaryDirection direction);

Sets the pole direction. The pole is on the middle bone and will direct to the pole target. The rotation axis is a vector that is orthogonal to this and the forward vector. Note: The pole direction and the forward vector shouldn't be colinear to avoid unintended rotation.

Parameters
NameTypeDefault
indexint—
directionSkeletonModifier3D.SecondaryDirection—
SetPoleDirectionVectorvoid
# SetPoleDirectionVector
C#
public void SetPoleDirectionVector(int index, Vector3 vector);

Sets the pole direction vector. This vector is normalized by an internal process. If the vector length is 0, it is considered synonymous with SkeletonModifier3D.SecondaryDirection.None.

Parameters
NameTypeDefault
indexint—
vectorVector3—
SetPoleEntityvoid
# SetPoleEntity
C#
public void SetPoleEntity(int index, EntityPath poleNode);

Sets the pole target node that constructs a plane which the joints are all on and the pole is trying to direct.

Parameters
NameTypeDefault
indexint—
poleNodeEntityPath—
SetRootBonevoid
# SetRootBone
C#
public void SetRootBone(int index, int bone);

Sets the root bone index.

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

Sets the root bone name.

Parameters
NameTypeDefault
indexint—
boneNamestring—
SetTargetEntityvoid
# SetTargetEntity
C#
public void SetTargetEntity(int index, EntityPath targetEntity);

Sets the target node that the end bone is trying to reach.

Parameters
NameTypeDefault
indexint—
targetEntityEntityPath—
SetUseVirtualEndvoid
# SetUseVirtualEnd
C#
public void SetUseVirtualEnd(int index, bool enabled);

If enabled is true, the end bone is extended from the middle bone as a virtual bone.

Parameters
NameTypeDefault
indexint—
enabledbool—
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.