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.

BoneConstraint3D

繼承: SkeletonModifier3D < Node3D < Node < Object

被繼承: AimModifier3D, ConvertTransformModifier3D, CopyTransformModifier3D

能夠修改 Skeleton3D 中骨骼對兩根骨骼進行關聯的節點。

說明

SkeletonModifier3D 的基底類別,能夠根據 get_reference_bone() 所獲得骨骼的變換修改 set_apply_bone() 中設定的骨骼。

注意:此類中的大多數方法都接受一個index參數。如果 IK 包含多個條目(例如 settings/<index>/amount),該參數用於指定應回傳哪個設定清單條目。

方法

void

clear_setting()

float

get_amount(index: int) const

int

get_apply_bone(index: int) const

String

get_apply_bone_name(index: int) const

int

get_reference_bone(index: int) const

String

get_reference_bone_name(index: int) const

NodePath

get_reference_node(index: int) const

ReferenceType

get_reference_type(index: int) const

int

get_setting_count() const

void

set_amount(index: int, amount: float)

void

set_apply_bone(index: int, bone: int)

void

set_apply_bone_name(index: int, bone_name: String)

void

set_reference_bone(index: int, bone: int)

void

set_reference_bone_name(index: int, bone_name: String)

void

set_reference_node(index: int, node: NodePath)

void

set_reference_type(index: int, type: ReferenceType)

void

set_setting_count(count: int)


列舉

enum ReferenceType: 🔗

ReferenceType REFERENCE_TYPE_BONE = 0

The reference target is a bone. In this case, the reference target space is local space.

ReferenceType REFERENCE_TYPE_NODE = 1

The reference target is a Node3D. In this case, the reference target space is model space.

In other words, the reference target's coordinates are treated as if it was placed directly under the Skeleton3D parent of the BoneConstraint3D.


方法說明

void clear_setting() 🔗

清空所有設定。


float get_amount(index: int) const 🔗

回傳索引為 index 的設定的應用量。


int get_apply_bone(index: int) const 🔗

回傳索引為 index 的設定的應用骨骼。骨骼會發生修改。


String get_apply_bone_name(index: int) const 🔗

回傳索引為 index 的設定的應用骨骼名稱。骨骼會發生修改。


int get_reference_bone(index: int) const 🔗

回傳索引為 index 的設定的參考骨骼。

修改器只會參考該骨骼,不會對其進行修改。


String get_reference_bone_name(index: int) const 🔗

回傳索引為 index 的設定的參考骨骼名稱。

修改器只會參考該骨骼,不會對其進行修改。


NodePath get_reference_node(index: int) const 🔗

Returns the reference node path of the setting at index.

This node will only be referenced and not modified by this modifier.


ReferenceType get_reference_type(index: int) const 🔗

回傳索引為 index 的設定的參考骨骼型別。參見 ReferenceType。


int get_setting_count() const 🔗

回傳修改器中的設定數。


void set_amount(index: int, amount: float) 🔗

將索引為 index 的設定的應用量設定為 amount。


void set_apply_bone(index: int, bone: int) 🔗

將索引為 index 的設定的應用骨骼設定為 bone。骨骼會發生修改。


void set_apply_bone_name(index: int, bone_name: String) 🔗

將索引為 index 的設定的應用骨骼名稱設定為 bone_name。骨骼會發生修改。


void set_reference_bone(index: int, bone: int) 🔗

Sets the reference bone of the setting at index to bone.

This bone will only be referenced and not modified by this modifier.


void set_reference_bone_name(index: int, bone_name: String) 🔗

Sets the reference bone of the setting at index to bone_name.

This bone will only be referenced and not modified by this modifier.


void set_reference_node(index: int, node: NodePath) 🔗

Sets the reference node path of the setting at index to node.

This node will only be referenced and not modified by this modifier.


void set_reference_type(index: int, type: ReferenceType) 🔗

將索引為 index 的設定的參考目標型別設定為 type。另見 ReferenceType。


void set_setting_count(count: int) 🔗

設定修改器中的設定數。