mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
259 lines
14 KiB
ReStructuredText
259 lines
14 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_SkeletonModification2DLookAt:
|
||
|
||
SkeletonModification2DLookAt
|
||
============================
|
||
|
||
**Экспериментальное:** This class may be changed or removed in future versions.
|
||
|
||
**Наследует:** :ref:`SkeletonModification2D<class_SkeletonModification2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
Модификация, которая вращает узел :ref:`Bone2D<class_Bone2D>` для обзора цели.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Описание
|
||
----------------
|
||
|
||
Этот :ref:`SkeletonModification2D<class_SkeletonModification2D>` вращает кость, чтобы посмотреть на цель. Это чрезвычайно полезно для перемещения головы персонажа, чтобы посмотреть на игрока, вращения башни, чтобы посмотреть на цель, или любого другого случая, когда вы хотите заставить кость быстро и легко вращаться в сторону чего-то.
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Свойства
|
||
----------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------------+-------------------------------------------------------------------------------------+------------------+
|
||
| :ref:`NodePath<class_NodePath>` | :ref:`bone2d_node<class_SkeletonModification2DLookAt_property_bone2d_node>` | ``NodePath("")`` |
|
||
+---------------------------------+-------------------------------------------------------------------------------------+------------------+
|
||
| :ref:`int<class_int>` | :ref:`bone_index<class_SkeletonModification2DLookAt_property_bone_index>` | ``-1`` |
|
||
+---------------------------------+-------------------------------------------------------------------------------------+------------------+
|
||
| :ref:`NodePath<class_NodePath>` | :ref:`target_nodepath<class_SkeletonModification2DLookAt_property_target_nodepath>` | ``NodePath("")`` |
|
||
+---------------------------------+-------------------------------------------------------------------------------------+------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методы
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_additional_rotation<class_SkeletonModification2DLookAt_method_get_additional_rotation>`\ (\ ) |const| |
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`get_constraint_angle_invert<class_SkeletonModification2DLookAt_method_get_constraint_angle_invert>`\ (\ ) |const| |
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_constraint_angle_max<class_SkeletonModification2DLookAt_method_get_constraint_angle_max>`\ (\ ) |const| |
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_constraint_angle_min<class_SkeletonModification2DLookAt_method_get_constraint_angle_min>`\ (\ ) |const| |
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`get_enable_constraint<class_SkeletonModification2DLookAt_method_get_enable_constraint>`\ (\ ) |const| |
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_additional_rotation<class_SkeletonModification2DLookAt_method_set_additional_rotation>`\ (\ rotation\: :ref:`float<class_float>`\ ) |
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_constraint_angle_invert<class_SkeletonModification2DLookAt_method_set_constraint_angle_invert>`\ (\ invert\: :ref:`bool<class_bool>`\ ) |
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_constraint_angle_max<class_SkeletonModification2DLookAt_method_set_constraint_angle_max>`\ (\ angle_max\: :ref:`float<class_float>`\ ) |
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_constraint_angle_min<class_SkeletonModification2DLookAt_method_set_constraint_angle_min>`\ (\ angle_min\: :ref:`float<class_float>`\ ) |
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_enable_constraint<class_SkeletonModification2DLookAt_method_set_enable_constraint>`\ (\ enable_constraint\: :ref:`bool<class_bool>`\ ) |
|
||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания свойств
|
||
--------------------------------
|
||
|
||
.. _class_SkeletonModification2DLookAt_property_bone2d_node:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`NodePath<class_NodePath>` **bone2d_node** = ``NodePath("")`` :ref:`🔗<class_SkeletonModification2DLookAt_property_bone2d_node>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_bone2d_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
|
||
- :ref:`NodePath<class_NodePath>` **get_bone2d_node**\ (\ )
|
||
|
||
Узел :ref:`Bone2D<class_Bone2D>`, на котором будет работать модификация.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_property_bone_index:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **bone_index** = ``-1`` :ref:`🔗<class_SkeletonModification2DLookAt_property_bone_index>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_bone_index**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_bone_index**\ (\ )
|
||
|
||
Индекс узла :ref:`Bone2D<class_Bone2D>`, на котором будет действовать модификация.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_property_target_nodepath:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` :ref:`🔗<class_SkeletonModification2DLookAt_property_target_nodepath>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_target_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
|
||
- :ref:`NodePath<class_NodePath>` **get_target_node**\ (\ )
|
||
|
||
NodePath к узлу, который является целью модификации LookAt. Это узел, к которому модификация повернет :ref:`Bone2D<class_Bone2D>`.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания метода
|
||
------------------------------
|
||
|
||
.. _class_SkeletonModification2DLookAt_method_get_additional_rotation:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_additional_rotation**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DLookAt_method_get_additional_rotation>`
|
||
|
||
Возвращает величину дополнительного поворота, применяемого после выполнения модификации LookAt.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_method_get_constraint_angle_invert:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **get_constraint_angle_invert**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DLookAt_method_get_constraint_angle_invert>`
|
||
|
||
Возвращает, инвертированы ли ограничения для этой модификации или нет.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_method_get_constraint_angle_max:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_constraint_angle_max**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DLookAt_method_get_constraint_angle_max>`
|
||
|
||
Возвращает максимально допустимый угол ограничения.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_method_get_constraint_angle_min:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_constraint_angle_min**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DLookAt_method_get_constraint_angle_min>`
|
||
|
||
Возвращает минимально допустимый угол ограничения.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_method_get_enable_constraint:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **get_enable_constraint**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DLookAt_method_get_enable_constraint>`
|
||
|
||
Возвращает ``true``, если модификация LookAt использует ограничения.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_method_set_additional_rotation:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_additional_rotation**\ (\ rotation\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DLookAt_method_set_additional_rotation>`
|
||
|
||
Устанавливает величину дополнительного вращения, которое должно быть применено после выполнения модификации. Это позволяет смещать результаты на введенную величину вращения.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_method_set_constraint_angle_invert:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_constraint_angle_invert**\ (\ invert\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DLookAt_method_set_constraint_angle_invert>`
|
||
|
||
Когда ``true``, модификация будет использовать инвертированное ограничение сустава.
|
||
|
||
Инвертированное ограничение сустава ограничивает :ref:`Bone2D<class_Bone2D>` только углами *вне* введенных минимальных и максимальных углов. По этой причине оно называется инвертированным ограничением сустава, так как оно ограничивает сустав снаружи введенных значений.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_method_set_constraint_angle_max:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_constraint_angle_max**\ (\ angle_max\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DLookAt_method_set_constraint_angle_max>`
|
||
|
||
Устанавливает максимально допустимый угол ограничения.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_method_set_constraint_angle_min:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_constraint_angle_min**\ (\ angle_min\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DLookAt_method_set_constraint_angle_min>`
|
||
|
||
Устанавливает минимально допустимый угол ограничения.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SkeletonModification2DLookAt_method_set_enable_constraint:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_enable_constraint**\ (\ enable_constraint\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DLookAt_method_set_enable_constraint>`
|
||
|
||
Устанавливает, будет ли эта модификация использовать ограничения или нет. Когда ``true``, ограничения будут применены при решении модификации LookAt.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Этот метод обычно должен быть переопределен пользователем, чтобы иметь какой-либо эффект.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Этот метод не имеет побочных эффектов. Он не изменяет ни одну из переменных-членов экземпляра.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Этот метод принимает любое количество аргументов после описанных здесь.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Этот метод используется для создания типа.)`
|
||
.. |static| replace:: :abbr:`static (Этот метод не нуждается в вызове экземпляра, поэтому его можно вызвать напрямую, используя имя класса.)`
|
||
.. |operator| replace:: :abbr:`operator (Этот метод описывает допустимый оператор для использования с этим типом в качестве левого операнда.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Это значение является целым числом, составленным как битовая маска следующих флагов.)`
|
||
.. |void| replace:: :abbr:`void (Нет возвращаемого значения.)`
|