Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

BoneAttachment3D

繼承: Node3D < Node < Object

對父級 Skeleton3D 中某個骨骼的 3D 變換進行複製或覆蓋的節點。

說明

這個節點能夠選中 Skeleton3D 中的某個骨骼並附加到這個骨骼上。這樣 BoneAttachment3D 節點就能夠動態複製或覆蓋所選骨骼的 3D 變換。

屬性

int

bone_idx

-1

String

bone_name

""

NodePath

external_skeleton

bool

override_pose

false

PhysicsInterpolationMode

physics_interpolation_mode

2 (overrides Node)

bool

use_external_skeleton

false

方法

Skeleton3D

get_skeleton()

void

on_skeleton_update()


屬性說明

int bone_idx = -1 🔗

  • void set_bone_idx(value: int)

  • int get_bone_idx()

所附著骨骼的索引。


String bone_name = "" 🔗

所附著骨骼的名稱。


NodePath external_skeleton 🔗

The NodePath to the external Skeleton3D node.


bool override_pose = false 🔗

  • void set_override_pose(value: bool)

  • 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 SkeletonModifier3D.


bool use_external_skeleton = false 🔗

  • void set_use_external_skeleton(value: bool)

  • bool get_use_external_skeleton()

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 external_skeleton.


方法說明

Skeleton3D get_skeleton() 🔗

Returns the parent or external Skeleton3D node if it exists, otherwise returns null.


void 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.