Class BoneAttachment3D
А node that dynamically copies or overrides the 3D transform of a bone in its parent Skeleton3D.
- Inheritance
-
BoneAttachment3D
Remarks
This node selects a bone in a Skeleton3D and attaches to it. This means that the BoneAttachment3D node will either dynamically copy or override the 3D transform of the selected bone.
Properties
bone_idx
The index of the attached bone.
var bone_idx : int = -1
Property Value
Remarks
bone_name
The name of the attached bone.
var bone_name : String = ""
Property Value
Remarks
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 SkeletonModifier3D.
var override_pose : bool = false
Property Value
Remarks
Methods
get_external_skeleton
Qualifiers: const
Returns the NodePath to the external Skeleton3D node, if one has been set.
NodePath get_external_skeleton
get_skeleton
Get parent or external Skeleton3D node if found.
Skeleton3D get_skeleton
get_use_external_skeleton
Qualifiers: const
Returns whether the BoneAttachment3D node is using an external Skeleton3D rather than attempting to use its parent node as the Skeleton3D.
bool get_use_external_skeleton
on_skeleton_update
A function that is called automatically when the 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.
void on_skeleton_update
set_external_skeleton(NodePath)
Sets the NodePath to the external skeleton that the BoneAttachment3D node should use. See BoneAttachment3D.set_use_external_skeleton to enable the external Skeleton3D node.
void set_external_skeleton(NodePath external_skeleton)
Parameters
external_skeleton
NodePath
set_use_external_skeleton(bool)
Sets whether the BoneAttachment3D node will use an external Skeleton3D node rather than attempting to use its parent node as the Skeleton3D. When set to true
, the BoneAttachment3D node will use the external Skeleton3D node set in BoneAttachment3D.set_external_skeleton.
void set_use_external_skeleton(bool use_external_skeleton)
Parameters
use_external_skeleton
bool