BoneAttachment3D
А node that dynamically copies or overrides the 3D transform of a bone in its parent Skeleton3D
.
描述
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.
属性
方法
NodePath | get_external_skeleton ( ) const1 |
Skeleton3D | get_skeleton ( ) |
bool | get_use_external_skeleton ( ) const1 |
void | on_skeleton_update ( ) |
void | set_external_skeleton ( external_skeleton: NodePath ) |
void | set_use_external_skeleton ( use_external_skeleton: bool ) |
属性说明
int
bone_idx = -1
The index of the attached bone.
String
bone_name = ""
The name of the attached bone.
bool
override_pose = false
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
.
方法说明
NodePath
get_external_skeleton ( ) const1
Returns the NodePath
to the external Skeleton3D
node, if one has been set.
Skeleton3D
get_skeleton ( )
Get parent or external Skeleton3D
node if found.
bool
get_use_external_skeleton ( ) const1
Returns whether the BoneAttachment3D node is using an external Skeleton3D
rather than attempting to use its parent node as the Skeleton3D
.
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.
void
set_external_skeleton ( external_skeleton: NodePath
)
Sets the NodePath
to the external skeleton that the BoneAttachment3D node should use. See set_use_external_skeleton
to enable the external Skeleton3D
node.
void
set_use_external_skeleton ( 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 set_external_skeleton
.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。