ChainIK3D
A SkeletonModifier3D to apply inverse kinematics to bone chains containing an arbitrary number of bones.
A SkeletonModifier3D to apply inverse kinematics to bone chains containing an arbitrary number of bones.
Base class of SkeletonModifier3D that automatically generates a joint list from the bones between the root bone and the end bone.
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.
Methods17
GetEndBoneint
public int GetEndBone(int index);Returns the end bone index of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
intGetEndBoneDirectionSkeletonModifier3D.BoneDirection
public SkeletonModifier3D.BoneDirection GetEndBoneDirection(int index);Returns the tail direction of the end bone of the bone chain when ChainIK3D.IsEndBoneExtended is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
SkeletonModifier3D.BoneDirectionGetEndBoneLengthfloat
public float GetEndBoneLength(int index);Returns the end bone tail length of the bone chain when ChainIK3D.IsEndBoneExtended is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
floatGetEndBoneNamestring
public string GetEndBoneName(int index);Returns the end bone name of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
stringGetJointBoneint
public int GetJointBone(int index, int joint);Returns the bone index at joint in the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
intGetJointBoneNamestring
public string GetJointBoneName(int index, int joint);Returns the bone name at joint in the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
stringGetJointCountint
public int GetJointCount(int index);Returns the joint count of the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
intGetRootBoneint
public int GetRootBone(int index);Returns the root bone index of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
intGetRootBoneNamestring
public string GetRootBoneName(int index);Returns the root bone name of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
stringIsEndBoneExtendedbool
public bool IsEndBoneExtended(int index);Returns true if the end bone is extended to have a tail.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolSetEndBonevoid
public void SetEndBone(int index, int bone);Sets the end bone index of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
bone | int | — |
SetEndBoneDirectionvoid
public void SetEndBoneDirection(int index, SkeletonModifier3D.BoneDirection boneDirection);Sets the end bone tail direction of the bone chain when ChainIK3D.IsEndBoneExtended is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
boneDirection | SkeletonModifier3D.BoneDirection | — |
SetEndBoneLengthvoid
public void SetEndBoneLength(int index, float length);Sets the end bone tail length of the bone chain when ChainIK3D.IsEndBoneExtended is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
length | float | — |
SetEndBoneNamevoid
public void SetEndBoneName(int index, string boneName);Sets the end bone name of the bone chain.
Note: The end bone must be the root bone or a child of the root bone. If they are the same, the tail must be extended by ChainIK3D.SetExtendEndBone to modify the bone.
| Name | Type | Default |
|---|---|---|
index | int | — |
boneName | string | — |
SetExtendEndBonevoid
public void SetExtendEndBone(int index, bool enabled);If enabled is true, the end bone is extended to have a tail.
The extended tail config is allocated to the last element in the joint list. In other words, if you set enabled to false, the config of the last element in the joint list has no effect in the simulated result.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetRootBonevoid
public void SetRootBone(int index, int bone);Sets the root bone index of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
bone | int | — |
SetRootBoneNamevoid
public void SetRootBoneName(int index, string boneName);Sets the root bone name of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
boneName | string | — |