:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ChainIK3D.xml. .. _class_ChainIK3D: ChainIK3D ========= **Inherits:** :ref:`IKModifier3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`IterateIK3D`, :ref:`SplineIK3D` A :ref:`SkeletonModifier3D` to apply inverse kinematics to bone chains containing an arbitrary number of bones. .. rst-class:: classref-introduction-group Description ----------- Base class of :ref:`SkeletonModifier3D` that automatically generates a joint list from the bones between the root bone and the end bone. .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_end_bone`\ (\ index\: :ref:`int`\ ) |const| | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`BoneDirection` | :ref:`get_end_bone_direction`\ (\ index\: :ref:`int`\ ) |const| | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_end_bone_length`\ (\ index\: :ref:`int`\ ) |const| | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_end_bone_name`\ (\ index\: :ref:`int`\ ) |const| | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_joint_bone`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_joint_bone_name`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_joint_count`\ (\ index\: :ref:`int`\ ) |const| | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_root_bone`\ (\ index\: :ref:`int`\ ) |const| | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_root_bone_name`\ (\ index\: :ref:`int`\ ) |const| | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_end_bone_extended`\ (\ index\: :ref:`int`\ ) |const| | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_end_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_end_bone_direction`\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_end_bone_length`\ (\ index\: :ref:`int`, length\: :ref:`float`\ ) | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_end_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_extend_end_bone`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_root_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_root_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ChainIK3D_method_get_end_bone: .. rst-class:: classref-method :ref:`int` **get_end_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the end bone index of the bone chain. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_get_end_bone_direction: .. rst-class:: classref-method :ref:`BoneDirection` **get_end_bone_direction**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the tail direction of the end bone of the bone chain when :ref:`is_end_bone_extended()` is ``true``. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_get_end_bone_length: .. rst-class:: classref-method :ref:`float` **get_end_bone_length**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the end bone tail length of the bone chain when :ref:`is_end_bone_extended()` is ``true``. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_get_end_bone_name: .. rst-class:: classref-method :ref:`String` **get_end_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the end bone name of the bone chain. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_get_joint_bone: .. rst-class:: classref-method :ref:`int` **get_joint_bone**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` Returns the bone index at ``joint`` in the bone chain's joint list. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_get_joint_bone_name: .. rst-class:: classref-method :ref:`String` **get_joint_bone_name**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` Returns the bone name at ``joint`` in the bone chain's joint list. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_get_joint_count: .. rst-class:: classref-method :ref:`int` **get_joint_count**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the joint count of the bone chain's joint list. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_get_root_bone: .. rst-class:: classref-method :ref:`int` **get_root_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the root bone index of the bone chain. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_get_root_bone_name: .. rst-class:: classref-method :ref:`String` **get_root_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the root bone name of the bone chain. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_is_end_bone_extended: .. rst-class:: classref-method :ref:`bool` **is_end_bone_extended**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if the end bone is extended to have a tail. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_set_end_bone: .. rst-class:: classref-method |void| **set_end_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` Sets the end bone index of the bone chain. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_set_end_bone_direction: .. rst-class:: classref-method |void| **set_end_bone_direction**\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) :ref:`🔗` Sets the end bone tail direction of the bone chain when :ref:`is_end_bone_extended()` is ``true``. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_set_end_bone_length: .. rst-class:: classref-method |void| **set_end_bone_length**\ (\ index\: :ref:`int`, length\: :ref:`float`\ ) :ref:`🔗` Sets the end bone tail length of the bone chain when :ref:`is_end_bone_extended()` is ``true``. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_set_end_bone_name: .. rst-class:: classref-method |void| **set_end_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` 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 :ref:`set_extend_end_bone()` to modify the bone. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_set_extend_end_bone: .. rst-class:: classref-method |void| **set_extend_end_bone**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` 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. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_set_root_bone: .. rst-class:: classref-method |void| **set_root_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` Sets the root bone index of the bone chain. .. rst-class:: classref-item-separator ---- .. _class_ChainIK3D_method_set_root_bone_name: .. rst-class:: classref-method |void| **set_root_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` Sets the root bone name of the bone chain. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`