Files
godot-docs/classes/class_boneattachment3d.rst
2023-07-24 10:19:37 +00:00

187 lines
8.4 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/BoneAttachment3D.xml.
.. _class_BoneAttachment3D:
BoneAttachment3D
================
**Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
А node that dynamically copies or overrides the 3D transform of a bone in its parent :ref:`Skeleton3D<class_Skeleton3D>`.
.. rst-class:: classref-introduction-group
Description
-----------
This node selects a bone in a :ref:`Skeleton3D<class_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<class_int>` | :ref:`bone_idx<class_BoneAttachment3D_property_bone_idx>` | ``-1`` |
+-----------------------------+---------------------------------------------------------------------+-----------+
| :ref:`String<class_String>` | :ref:`bone_name<class_BoneAttachment3D_property_bone_name>` | ``""`` |
+-----------------------------+---------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`override_pose<class_BoneAttachment3D_property_override_pose>` | ``false`` |
+-----------------------------+---------------------------------------------------------------------+-----------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`NodePath<class_NodePath>` | :ref:`get_external_skeleton<class_BoneAttachment3D_method_get_external_skeleton>` **(** **)** |const| |
+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_use_external_skeleton<class_BoneAttachment3D_method_get_use_external_skeleton>` **(** **)** |const| |
+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`on_bone_pose_update<class_BoneAttachment3D_method_on_bone_pose_update>` **(** :ref:`int<class_int>` bone_index **)** |
+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_external_skeleton<class_BoneAttachment3D_method_set_external_skeleton>` **(** :ref:`NodePath<class_NodePath>` external_skeleton **)** |
+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_use_external_skeleton<class_BoneAttachment3D_method_set_use_external_skeleton>` **(** :ref:`bool<class_bool>` use_external_skeleton **)** |
+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_BoneAttachment3D_property_bone_idx:
.. rst-class:: classref-property
:ref:`int<class_int>` **bone_idx** = ``-1``
.. rst-class:: classref-property-setget
- void **set_bone_idx** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_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<class_String>` **bone_name** = ``""``
.. rst-class:: classref-property-setget
- void **set_bone_name** **(** :ref:`String<class_String>` value **)**
- :ref:`String<class_String>` **get_bone_name** **(** **)**
The name of the attached bone.
.. rst-class:: classref-item-separator
----
.. _class_BoneAttachment3D_property_override_pose:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **override_pose** = ``false``
.. rst-class:: classref-property-setget
- void **set_override_pose** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_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.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_BoneAttachment3D_method_get_external_skeleton:
.. rst-class:: classref-method
:ref:`NodePath<class_NodePath>` **get_external_skeleton** **(** **)** |const|
Returns the :ref:`NodePath<class_NodePath>` to the external :ref:`Skeleton3D<class_Skeleton3D>` node, if one has been set.
.. rst-class:: classref-item-separator
----
.. _class_BoneAttachment3D_method_get_use_external_skeleton:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **get_use_external_skeleton** **(** **)** |const|
Returns whether the BoneAttachment3D node is using an external :ref:`Skeleton3D<class_Skeleton3D>` rather than attempting to use its parent node as the :ref:`Skeleton3D<class_Skeleton3D>`.
.. rst-class:: classref-item-separator
----
.. _class_BoneAttachment3D_method_on_bone_pose_update:
.. rst-class:: classref-method
void **on_bone_pose_update** **(** :ref:`int<class_int>` bone_index **)**
A function that is called automatically when the :ref:`Skeleton3D<class_Skeleton3D>` the BoneAttachment3D node is using has a bone that has changed its pose. 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.
.. rst-class:: classref-item-separator
----
.. _class_BoneAttachment3D_method_set_external_skeleton:
.. rst-class:: classref-method
void **set_external_skeleton** **(** :ref:`NodePath<class_NodePath>` external_skeleton **)**
Sets the :ref:`NodePath<class_NodePath>` to the external skeleton that the BoneAttachment3D node should use. See :ref:`set_use_external_skeleton<class_BoneAttachment3D_method_set_use_external_skeleton>` to enable the external :ref:`Skeleton3D<class_Skeleton3D>` node.
.. rst-class:: classref-item-separator
----
.. _class_BoneAttachment3D_method_set_use_external_skeleton:
.. rst-class:: classref-method
void **set_use_external_skeleton** **(** :ref:`bool<class_bool>` use_external_skeleton **)**
Sets whether the BoneAttachment3D node will use an extenral :ref:`Skeleton3D<class_Skeleton3D>` node rather than attenpting to use its parent node as the :ref:`Skeleton3D<class_Skeleton3D>`. When set to ``true``, the BoneAttachment3D node will use the external :ref:`Skeleton3D<class_Skeleton3D>` node set in :ref:`set_external_skeleton<class_BoneAttachment3D_method_set_external_skeleton>`.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |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.)`