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...
ConvertTransformModifier3D
繼承: BoneConstraint3D < SkeletonModifier3D < Node3D < Node < Object
對骨骼應用變換的 SkeletonModifier3D,變換轉換自參考骨骼。
說明
Apply the copied transform of the bone set by BoneConstraint3D.set_reference_bone() to the bone set by BoneConstraint3D.set_apply_bone() about the specific axis with remapping it with some options.
There are 4 ways to apply the transform, depending on the combination of set_relative() and set_additive().
Relative + Additive:
Extract reference pose relative to the rest and add it to the apply bone's pose.
Relative + Not Additive:
Extract reference pose relative to the rest and add it to the apply bone's rest.
Not Relative + Additive:
Extract reference pose absolutely and add it to the apply bone's pose.
Not Relative + Not Additive:
Extract reference pose absolutely and the apply bone's pose is replaced with it.
Note: The relative and global options are only available when BoneConstraint3D.get_reference_type() is BoneConstraint3D.REFERENCE_TYPE_BONE. See also ReferenceType.
Note: If there is a rotation greater than 180 degrees with constrained axes, flipping may occur.
屬性
|
方法
get_apply_axis(index: int) const |
|
get_apply_range_max(index: int) const |
|
get_apply_range_min(index: int) const |
|
get_apply_transform_mode(index: int) const |
|
get_reference_axis(index: int) const |
|
get_reference_range_max(index: int) const |
|
get_reference_range_min(index: int) const |
|
get_reference_transform_mode(index: int) const |
|
is_additive(index: int) const |
|
is_relative(index: int) const |
|
void |
set_additive(index: int, enabled: bool) |
void |
set_apply_axis(index: int, axis: Axis) |
void |
set_apply_range_max(index: int, range_max: float) |
void |
set_apply_range_min(index: int, range_min: float) |
void |
set_apply_transform_mode(index: int, transform_mode: TransformMode) |
void |
set_global(index: int, enabled: bool) |
void |
set_reference_axis(index: int, axis: Axis) |
void |
set_reference_range_max(index: int, range_max: float) |
void |
set_reference_range_min(index: int, range_min: float) |
void |
set_reference_transform_mode(index: int, transform_mode: TransformMode) |
void |
set_relative(index: int, enabled: bool) |
列舉
enum TransformMode: 🔗
TransformMode TRANSFORM_MODE_POSITION = 0
轉換時使用位置。傳遞差值。
TransformMode TRANSFORM_MODE_ROTATION = 1
轉換時使用旋轉。角度是指定軸的翻滾值。
TransformMode TRANSFORM_MODE_SCALE = 2
轉換時使用縮放。傳遞比例而不是差值。
屬性說明
此修改器中的設定項數量。
方法說明
Axis get_apply_axis(index: int) const 🔗
回傳重映射目標變換的軸。
float get_apply_range_max(index: int) const 🔗
回傳重映射目標範圍的最大值。
float get_apply_range_min(index: int) const 🔗
回傳重映射目標範圍的最小值。
TransformMode get_apply_transform_mode(index: int) const 🔗
回傳重映射目標變換的操作。
Axis get_reference_axis(index: int) const 🔗
回傳重映射來源變換的軸。
float get_reference_range_max(index: int) const 🔗
回傳重映射來源範圍的最大值。
float get_reference_range_min(index: int) const 🔗
回傳重映射來源範圍的最小值。
TransformMode get_reference_transform_mode(index: int) const 🔗
回傳重映射來源變換的操作。
bool is_additive(index: int) const 🔗
如果索引為 index 的設定啟用了加法選項,則回傳 true。
bool is_global(index: int) const 🔗
Returns true if the global option is enabled in the setting at index.
bool is_relative(index: int) const 🔗
如果索引為 index 的設定啟用了相對選項,則回傳 true。
void set_additive(index: int, enabled: bool) 🔗
Sets additive option in the setting at index to enabled. This mainly affects the process of applying transform to the BoneConstraint3D.set_apply_bone().
If enabled is true, the processed transform is added to the pose of the current apply bone.
If enabled is false, the pose of the current apply bone is replaced with the processed transform. However, if set set_relative() to true, the transform is relative to rest.
void set_apply_axis(index: int, axis: Axis) 🔗
設定重映射目標變換的軸。
void set_apply_range_max(index: int, range_max: float) 🔗
設定重映射目標範圍的最大值。
void set_apply_range_min(index: int, range_min: float) 🔗
設定重映射目標範圍的最小值。
void set_apply_transform_mode(index: int, transform_mode: TransformMode) 🔗
設定重映射目標變換的操作。
void set_global(index: int, enabled: bool) 🔗
Sets the global option in the setting at index to enabled.
If enabled is true, the global pose of the reference bone is used as the remapping source.
If enabled is false, the local pose of the reference bone is used as the remapping source.
Note: If the parent of the reference bone has a non-uniform scale, the reference bone is sheared as seen from global space. Since the local pose cannot bring in the shear, the scale may not be applied as intended.
void set_reference_axis(index: int, axis: Axis) 🔗
設定重映射來源變換的軸。
void set_reference_range_max(index: int, range_max: float) 🔗
設定重映射來源範圍的最大值。
void set_reference_range_min(index: int, range_min: float) 🔗
設定重映射來源範圍的最小值。
void set_reference_transform_mode(index: int, transform_mode: TransformMode) 🔗
設定重映射來源變換的操作。
void set_relative(index: int, enabled: bool) 🔗
Sets relative option in the setting at index to enabled.
If enabled is true, the extracted and applying transform is relative to the rest.
If enabled is false, the extracted transform is absolute.