AimModifier3D
Inherits: BoneConstraint3D < SkeletonModifier3D < Entity3D < Entity < Object
Description
Section titled “Description”The AimModifier3D rotates a bone to look at a reference bone.
This is a simple version of LookAtModifier3D that only allows bone to the reference without advanced options such as angle limitation or time-based interpolation.
The feature is simplified, but instead it is implemented with smooth tracking without euler, see set_use_euler().
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| int | setting_count |
0 |
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| SkeletonModifier3D.BoneAxis | get_forward_axis(index: int) const |
| Vector3.Axis | get_primary_rotation_axis(index: int) const |
| bool | is_relative(index: int) const |
| bool | is_using_euler(index: int) const |
| bool | is_using_secondary_rotation(index: int) const |
| void | set_forward_axis(index: int, axis: SkeletonModifier3D.BoneAxis) |
| void | set_primary_rotation_axis(index: int, axis: Vector3.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) |
Property descriptions
Section titled “Property descriptions”setting_count
int setting_count = 0
The number of settings in the modifier.
Method descriptions
Section titled “Method descriptions”get_forward_axis
SkeletonModifier3D.BoneAxis get_forward_axis(index: int) const
Returns the forward axis of the bone.
get_primary_rotation_axis
Vector3.Axis get_primary_rotation_axis(index: int) const
Returns the axis of the first rotation. It is enabled only if is_using_euler() is true.
is_relative
bool is_relative(index: int) const
Returns true if the relative option is enabled in the setting at index.
is_using_euler
bool is_using_euler(index: int) const
Returns true if it provides rotation with using euler.
is_using_secondary_rotation
bool is_using_secondary_rotation(index: int) const
Returns true if it provides rotation by two axes. It is enabled only if is_using_euler() is true.
set_forward_axis
void set_forward_axis(index: int, axis: SkeletonModifier3D.BoneAxis)
Sets the forward axis of the bone.
set_primary_rotation_axis
void set_primary_rotation_axis(index: int, axis: Vector3.Axis)
Sets the axis of the first rotation. It is enabled only if is_using_euler() is true.
set_relative
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.
set_use_euler
void set_use_euler(index: int, enabled: bool)
If sets enabled to true, it provides rotation with using euler.
If sets enabled to false, it provides rotation with using rotation by arc generated from the forward axis vector and the vector toward the reference.
set_use_secondary_rotation
void set_use_secondary_rotation(index: int, enabled: bool)
If sets enabled to true, it provides rotation by two axes. It is enabled only if is_using_euler() is true.
