Class reference
AimModifier3D
Inherits BoneConstraint3D
The AimModifier3D rotates a bone to look at a reference bone.
Description
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
int setting_count = 0
int setting_count = 0The number of settings in the modifier.
Methods
int get_forward_axis(int index) const
int get_forward_axis(int index) constReturns the forward axis of the bone.
int get_primary_rotation_axis(int index) const
int get_primary_rotation_axis(int index) constReturns the axis of the first rotation. It is enabled only if is_using_euler() is true.
bool is_relative(int index) const
bool is_relative(int index) constReturns true if the relative option is enabled in the setting at index.
bool is_using_euler(int index) const
bool is_using_euler(int index) constReturns true if it provides rotation with using euler.
bool is_using_secondary_rotation(int index) const
bool is_using_secondary_rotation(int index) constReturns true if it provides rotation by two axes. It is enabled only if is_using_euler() is true.
void set_forward_axis(int index, int axis)
int index, int axis)Sets the forward axis of the bone.
void set_primary_rotation_axis(int index, int axis)
int index, int axis)Sets the axis of the first rotation. It is enabled only if is_using_euler() is true.
void set_relative(int index, bool enabled)
int index, bool enabled)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(int index, bool enabled)
int index, bool enabled)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.
void set_use_secondary_rotation(int index, bool enabled)
int index, bool enabled)If sets enabled to true, it provides rotation by two axes. It is enabled only if is_using_euler() is true.