123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- :github_url: hide
- .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the BoneAttachment3D.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_BoneAttachment3D:
- BoneAttachment3D
- ================
- **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- A node that will attach to a bone.
- Description
- -----------
- This node will allow you to select a bone for this node to attach to. The BoneAttachment3D node can copy the transform of the select bone, or can override the transform of the selected bone.
- The BoneAttachment3D node must either be a child of a :ref:`Skeleton3D<class_Skeleton3D>` node or be given an external :ref:`Skeleton3D<class_Skeleton3D>` to use in order to function properly.
- Properties
- ----------
- +-----------------------------+-------------------------------------------------------------+--------+
- | :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>` | ``""`` |
- +-----------------------------+-------------------------------------------------------------+--------+
- Methods
- -------
- +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`NodePath<class_NodePath>` | :ref:`get_external_skeleton<class_BoneAttachment3D_method_get_external_skeleton>` **(** **)** |const| |
- +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_override_mode<class_BoneAttachment3D_method_get_override_mode>` **(** **)** |const| |
- +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`get_override_pose<class_BoneAttachment3D_method_get_override_pose>` **(** **)** |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_override_mode<class_BoneAttachment3D_method_set_override_mode>` **(** :ref:`int<class_int>` override_mode **)** |
- +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_override_pose<class_BoneAttachment3D_method_set_override_pose>` **(** :ref:`bool<class_bool>` override_pose **)** |
- +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_use_external_skeleton<class_BoneAttachment3D_method_set_use_external_skeleton>` **(** :ref:`bool<class_bool>` use_external_skeleton **)** |
- +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- Property Descriptions
- ---------------------
- .. _class_BoneAttachment3D_property_bone_idx:
- - :ref:`int<class_int>` **bone_idx**
- +-----------+---------------------+
- | *Default* | ``-1`` |
- +-----------+---------------------+
- | *Setter* | set_bone_idx(value) |
- +-----------+---------------------+
- | *Getter* | get_bone_idx() |
- +-----------+---------------------+
- The index of the attached bone.
- ----
- .. _class_BoneAttachment3D_property_bone_name:
- - :ref:`String<class_String>` **bone_name**
- +-----------+----------------------+
- | *Default* | ``""`` |
- +-----------+----------------------+
- | *Setter* | set_bone_name(value) |
- +-----------+----------------------+
- | *Getter* | get_bone_name() |
- +-----------+----------------------+
- The name of the attached bone.
- Method Descriptions
- -------------------
- .. _class_BoneAttachment3D_method_get_external_skeleton:
- - :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.
- ----
- .. _class_BoneAttachment3D_method_get_override_mode:
- - :ref:`int<class_int>` **get_override_mode** **(** **)** |const|
- Returns the override mode for the BoneAttachment3D node.
- ----
- .. _class_BoneAttachment3D_method_get_override_pose:
- - :ref:`bool<class_bool>` **get_override_pose** **(** **)** |const|
- Returns whether the BoneAttachment3D node is overriding the bone pose of the bone it's attached to.
- ----
- .. _class_BoneAttachment3D_method_get_use_external_skeleton:
- - :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>`.
- ----
- .. _class_BoneAttachment3D_method_on_bone_pose_update:
- - 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.
- ----
- .. _class_BoneAttachment3D_method_set_external_skeleton:
- - 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. The external :ref:`Skeleton3D<class_Skeleton3D>` node is only used when ``use_external_skeleton`` is set to ``true``.
- ----
- .. _class_BoneAttachment3D_method_set_override_mode:
- - void **set_override_mode** **(** :ref:`int<class_int>` override_mode **)**
- Sets the override mode for the BoneAttachment3D node. The override mode defines which of the bone poses the BoneAttachment3D node will override.
- ----
- .. _class_BoneAttachment3D_method_set_override_pose:
- - void **set_override_pose** **(** :ref:`bool<class_bool>` override_pose **)**
- Sets 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.
- ----
- .. _class_BoneAttachment3D_method_set_use_external_skeleton:
- - 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 ``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.)`
|