:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AimModifier3D.xml. .. _class_AimModifier3D: AimModifier3D ============= **Inherits:** :ref:`BoneConstraint3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` The **AimModifier3D** rotates a bone to look at a reference bone. .. rst-class:: classref-introduction-group Description ----------- This is a simple version of :ref:`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 :ref:`set_use_euler()`. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-----------------------+------------------------------------------------------------------+-------+ | :ref:`int` | :ref:`setting_count` | ``0`` | +-----------------------+------------------------------------------------------------------+-------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`BoneAxis` | :ref:`get_forward_axis`\ (\ index\: :ref:`int`\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Axis` | :ref:`get_primary_rotation_axis`\ (\ index\: :ref:`int`\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_using_euler`\ (\ index\: :ref:`int`\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_using_secondary_rotation`\ (\ index\: :ref:`int`\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_forward_axis`\ (\ index\: :ref:`int`, axis\: :ref:`BoneAxis`\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_primary_rotation_axis`\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_use_euler`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_use_secondary_rotation`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AimModifier3D_property_setting_count: .. rst-class:: classref-property :ref:`int` **setting_count** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_setting_count**\ (\ ) The number of settings in the modifier. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AimModifier3D_method_get_forward_axis: .. rst-class:: classref-method :ref:`BoneAxis` **get_forward_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the forward axis of the bone. .. rst-class:: classref-item-separator ---- .. _class_AimModifier3D_method_get_primary_rotation_axis: .. rst-class:: classref-method :ref:`Axis` **get_primary_rotation_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the axis of the first rotation. It is enabled only if :ref:`is_using_euler()` is ``true``. .. rst-class:: classref-item-separator ---- .. _class_AimModifier3D_method_is_using_euler: .. rst-class:: classref-method :ref:`bool` **is_using_euler**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if it provides rotation with using euler. .. rst-class:: classref-item-separator ---- .. _class_AimModifier3D_method_is_using_secondary_rotation: .. rst-class:: classref-method :ref:`bool` **is_using_secondary_rotation**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if it provides rotation by two axes. It is enabled only if :ref:`is_using_euler()` is ``true``. .. rst-class:: classref-item-separator ---- .. _class_AimModifier3D_method_set_forward_axis: .. rst-class:: classref-method |void| **set_forward_axis**\ (\ index\: :ref:`int`, axis\: :ref:`BoneAxis`\ ) :ref:`🔗` Sets the forward axis of the bone. .. rst-class:: classref-item-separator ---- .. _class_AimModifier3D_method_set_primary_rotation_axis: .. rst-class:: classref-method |void| **set_primary_rotation_axis**\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) :ref:`🔗` Sets the axis of the first rotation. It is enabled only if :ref:`is_using_euler()` is ``true``. .. rst-class:: classref-item-separator ---- .. _class_AimModifier3D_method_set_use_euler: .. rst-class:: classref-method |void| **set_use_euler**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` 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. .. rst-class:: classref-item-separator ---- .. _class_AimModifier3D_method_set_use_secondary_rotation: .. rst-class:: classref-method |void| **set_use_secondary_rotation**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` If sets ``enabled`` to ``true``, it provides rotation by two axes. It is enabled only if :ref:`is_using_euler()` is ``true``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`