BoneAttachment3D

Inherits: Node3D < Node < 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 Skeleton3D node or be given an external Skeleton3D to use in order to function properly.

Properties

int

bone_idx

-1

String

bone_name

""

Methods

NodePath

get_external_skeleton ( ) const

int

get_override_mode ( ) const

bool

get_override_pose ( ) const

bool

get_use_external_skeleton ( ) const

void

on_bone_pose_update ( int bone_index )

void

set_external_skeleton ( NodePath external_skeleton )

void

set_override_mode ( int override_mode )

void

set_override_pose ( bool override_pose )

void

set_use_external_skeleton ( bool use_external_skeleton )

Property Descriptions

Default

-1

Setter

set_bone_idx(value)

Getter

get_bone_idx()

The index of the attached bone.


Default

""

Setter

set_bone_name(value)

Getter

get_bone_name()

The name of the attached bone.

Method Descriptions

  • NodePath get_external_skeleton ( ) const

Returns the NodePath to the external Skeleton3D node, if one has been set.


  • int get_override_mode ( ) const

Returns the override mode for the BoneAttachment3D node.


  • bool get_override_pose ( ) const

Returns whether the BoneAttachment3D node is overriding the bone pose of the bone it's attached to.


  • bool get_use_external_skeleton ( ) const

Returns whether the BoneAttachment3D node is using an external Skeleton3D rather than attempting to use its parent node as the Skeleton3D.


  • void on_bone_pose_update ( int bone_index )

A function that is called automatically when the 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.


  • void set_external_skeleton ( NodePath external_skeleton )

Sets the NodePath to the external skeleton that the BoneAttachment3D node should use. The external Skeleton3D node is only used when use_external_skeleton is set to true.


  • void set_override_mode ( 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.


  • void set_override_pose ( 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.


  • void set_use_external_skeleton ( bool use_external_skeleton )

Sets whether the BoneAttachment3D node will use an extenral Skeleton3D node rather than attenpting to use its parent node as the Skeleton3D. When set to true, the BoneAttachment3D node will use the external Skeleton3D node set in set_external_skeleton.