Files
godot-docs-l10n/classes/uk/class_skeletonmodification2dlookat.rst

259 lines
14 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

: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 (Значення не повертається.)`