Class reference
ChainIK3D
Inherits IKModifier3D
A SkeletonModifier3D to apply inverse kinematics to bone chains containing an arbitrary number of bones.
Description
Base class of SkeletonModifier3D that automatically generates a joint list from the bones between the root bone and the end bone.
Methods
int get_end_bone(int index) const
int get_end_bone(int index) constReturns the end bone index of the bone chain.
int get_end_bone_direction(int index) const
int get_end_bone_direction(int index) constReturns the tail direction of the end bone of the bone chain when is_end_bone_extended() is true.
float get_end_bone_length(int index) const
float get_end_bone_length(int index) constReturns the end bone tail length of the bone chain when is_end_bone_extended() is true.
String get_end_bone_name(int index) const
String get_end_bone_name(int index) constReturns the end bone name of the bone chain.
int get_joint_bone(int index, int joint) const
int get_joint_bone(int index, int joint) constReturns the bone index at joint in the bone chain's joint list.
String get_joint_bone_name(int index, int joint) const
String get_joint_bone_name(int index, int joint) constReturns the bone name at joint in the bone chain's joint list.
int get_joint_count(int index) const
int get_joint_count(int index) constReturns the joint count of the bone chain's joint list.
int get_root_bone(int index) const
int get_root_bone(int index) constReturns the root bone index of the bone chain.
String get_root_bone_name(int index) const
String get_root_bone_name(int index) constReturns the root bone name of the bone chain.
bool is_end_bone_extended(int index) const
bool is_end_bone_extended(int index) constReturns true if the end bone is extended to have a tail.
void set_end_bone(int index, int bone)
int index, int bone)Sets the end bone index of the bone chain.
void set_end_bone_direction(int index, int bone_direction)
int index, int bone_direction)Sets the end bone tail direction of the bone chain when is_end_bone_extended() is true.
void set_end_bone_length(int index, float length)
int index, float length)Sets the end bone tail length of the bone chain when is_end_bone_extended() is true.
void set_end_bone_name(int index, String bone_name)
int index, String bone_name)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 set_extend_end_bone() to modify the bone.
void set_extend_end_bone(int index, bool enabled)
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.
void set_root_bone(int index, int bone)
int index, int bone)Sets the root bone index of the bone chain.
void set_root_bone_name(int index, String bone_name)
int index, String bone_name)Sets the root bone name of the bone chain.