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.
Checking the stable version of the documentation...
AimModifier3D
繼承: BoneConstraint3D < SkeletonModifier3D < Node3D < Node < Object
AimModifier3D 會旋轉骨骼,使其朝向參考骨骼。
說明
這是 LookAtModifier3D 的簡化版本,只支援將骨骼對準參考骨骼,不含角度限制或以時間為基礎的內插等進階選項。
雖然功能精簡,但以平滑追蹤方式實作,且不使用歐拉角,請參閱 set_use_euler()。
屬性
|
方法
get_forward_axis(index: int) const |
|
get_primary_rotation_axis(index: int) const |
|
is_relative(index: int) const |
|
is_using_euler(index: int) const |
|
is_using_secondary_rotation(index: int) const |
|
void |
set_forward_axis(index: int, axis: BoneAxis) |
void |
set_primary_rotation_axis(index: int, axis: Axis) |
void |
set_relative(index: int, enabled: bool) |
void |
set_use_euler(index: int, enabled: bool) |
void |
set_use_secondary_rotation(index: int, enabled: bool) |
屬性說明
此修改器中的設定項數量。
方法說明
BoneAxis get_forward_axis(index: int) const 🔗
傳回骨骼的前向軸。
Axis get_primary_rotation_axis(index: int) const 🔗
傳回第一旋轉的軸向;僅當 is_using_euler() 為 true 時有效。
bool is_relative(index: int) const 🔗
Returns true if the relative option is enabled in the setting at index.
bool is_using_euler(index: int) const 🔗
若使用歐拉角進行旋轉,則傳回 true。
bool is_using_secondary_rotation(index: int) const 🔗
若使用雙軸進行旋轉,則傳回 true;僅當 is_using_euler() 為 true 時有效。
void set_forward_axis(index: int, axis: BoneAxis) 🔗
設定骨骼的前向軸。
void set_primary_rotation_axis(index: int, axis: Axis) 🔗
設定第一旋轉的軸向;僅當 is_using_euler() 為 true 時有效。
void set_relative(index: int, enabled: bool) 🔗
Sets relative option in the setting at index to enabled.
If sets enabled to true, the rotation is applied relative to the pose.
If sets enabled to false, the rotation is applied relative to the rest. It means to replace the current pose with the AimModifier3D's result.
void set_use_euler(index: int, enabled: bool) 🔗
若將 enabled 設為 true,即使用歐拉角來計算旋轉。
若將 enabled 設為 false,則改以由前向軸向量與指向參考的向量所形成的弧度來計算旋轉。
void set_use_secondary_rotation(index: int, enabled: bool) 🔗
若將 enabled 設為 true,將使用雙軸旋轉;僅當 is_using_euler() 為 true 時有效。