:github_url: hide .. meta:: :keywords: tag .. 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/BoneAttachment3D.xml. .. _class_BoneAttachment3D: BoneAttachment3D ================ **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` А node that dynamically copies or overrides the 3D transform of a bone in its parent :ref:`Skeleton3D`. .. rst-class:: classref-introduction-group Description ----------- This node selects a bone in a :ref:`Skeleton3D` and attaches to it. This means that the **BoneAttachment3D** node will either dynamically copy or override the 3D transform of the selected bone. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bone_idx` | ``-1`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`String` | :ref:`bone_name` | ``""`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`external_skeleton` | | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`override_pose` | ``false`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`use_external_skeleton` | ``false`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-------------------------------------+-----------------------------------------------------------------------------------+ | :ref:`Skeleton3D` | :ref:`get_skeleton`\ (\ ) | +-------------------------------------+-----------------------------------------------------------------------------------+ | |void| | :ref:`on_skeleton_update`\ (\ ) | +-------------------------------------+-----------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BoneAttachment3D_property_bone_idx: .. rst-class:: classref-property :ref:`int` **bone_idx** = ``-1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_bone_idx**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_bone_idx**\ (\ ) The index of the attached bone. .. rst-class:: classref-item-separator ---- .. _class_BoneAttachment3D_property_bone_name: .. rst-class:: classref-property :ref:`String` **bone_name** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_bone_name**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_bone_name**\ (\ ) The name of the attached bone. .. rst-class:: classref-item-separator ---- .. _class_BoneAttachment3D_property_external_skeleton: .. rst-class:: classref-property :ref:`NodePath` **external_skeleton** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_external_skeleton**\ (\ value\: :ref:`NodePath`\ ) - :ref:`NodePath` **get_external_skeleton**\ (\ ) The :ref:`NodePath` to the external :ref:`Skeleton3D` node. .. rst-class:: classref-item-separator ---- .. _class_BoneAttachment3D_property_override_pose: .. rst-class:: classref-property :ref:`bool` **override_pose** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_override_pose**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_override_pose**\ (\ ) Whether the **BoneAttachment3D** node will override the bone pose of the bone it is attached to. When set to ``true``, the **BoneAttachment3D** node can change the pose of the bone. When set to ``false``, the **BoneAttachment3D** will always be set to the bone's transform. \ **Note:** This override performs interruptively in the skeleton update process using signals due to the old design. It may cause unintended behavior when used at the same time with :ref:`SkeletonModifier3D`. .. rst-class:: classref-item-separator ---- .. _class_BoneAttachment3D_property_use_external_skeleton: .. rst-class:: classref-property :ref:`bool` **use_external_skeleton** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_use_external_skeleton**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_use_external_skeleton**\ (\ ) Whether the **BoneAttachment3D** node will use an external :ref:`Skeleton3D` node rather than attempting to use its parent node as the :ref:`Skeleton3D`. When set to ``true``, the **BoneAttachment3D** node will use the external :ref:`Skeleton3D` node set in :ref:`external_skeleton`. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_BoneAttachment3D_method_get_skeleton: .. rst-class:: classref-method :ref:`Skeleton3D` **get_skeleton**\ (\ ) :ref:`🔗` Returns the parent or external :ref:`Skeleton3D` node if it exists, otherwise returns ``null``. .. rst-class:: classref-item-separator ---- .. _class_BoneAttachment3D_method_on_skeleton_update: .. rst-class:: classref-method |void| **on_skeleton_update**\ (\ ) :ref:`🔗` A function that is called automatically when the :ref:`Skeleton3D` is updated. This function is where the **BoneAttachment3D** node updates its position so it is correctly bound when it is *not* set to override the bone pose. .. |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.)`