mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
157 lines
7.7 KiB
ReStructuredText
157 lines
7.7 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_PinJoint2D:
|
||
|
||
PinJoint2D
|
||
==========
|
||
|
||
**Наследует:** :ref:`Joint2D<class_Joint2D>` **<** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
Физический шарнир, который соединяет два двухмерных физических тела в одной точке, позволяя им свободно вращаться.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Описание
|
||
----------------
|
||
|
||
Физический сустав, который соединяет два 2D физических тела в одной точке, позволяя им свободно вращаться. Например, :ref:`RigidBody2D<class_RigidBody2D>` можно присоединить к :ref:`StaticBody2D<class_StaticBody2D>`, чтобы создать маятник или качели.
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Свойства
|
||
----------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------+-------------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`angular_limit_enabled<class_PinJoint2D_property_angular_limit_enabled>` | ``false`` |
|
||
+---------------------------+-------------------------------------------------------------------------------+-----------+
|
||
| :ref:`float<class_float>` | :ref:`angular_limit_lower<class_PinJoint2D_property_angular_limit_lower>` | ``0.0`` |
|
||
+---------------------------+-------------------------------------------------------------------------------+-----------+
|
||
| :ref:`float<class_float>` | :ref:`angular_limit_upper<class_PinJoint2D_property_angular_limit_upper>` | ``0.0`` |
|
||
+---------------------------+-------------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`motor_enabled<class_PinJoint2D_property_motor_enabled>` | ``false`` |
|
||
+---------------------------+-------------------------------------------------------------------------------+-----------+
|
||
| :ref:`float<class_float>` | :ref:`motor_target_velocity<class_PinJoint2D_property_motor_target_velocity>` | ``0.0`` |
|
||
+---------------------------+-------------------------------------------------------------------------------+-----------+
|
||
| :ref:`float<class_float>` | :ref:`softness<class_PinJoint2D_property_softness>` | ``0.0`` |
|
||
+---------------------------+-------------------------------------------------------------------------------+-----------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания свойств
|
||
--------------------------------
|
||
|
||
.. _class_PinJoint2D_property_angular_limit_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **angular_limit_enabled** = ``false`` :ref:`🔗<class_PinJoint2D_property_angular_limit_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_angular_limit_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_angular_limit_enabled**\ (\ )
|
||
|
||
Если ``true``, применяются максимальное и минимальное вращение штифта, определяемое :ref:`angular_limit_lower<class_PinJoint2D_property_angular_limit_lower>` и :ref:`angular_limit_upper<class_PinJoint2D_property_angular_limit_upper>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PinJoint2D_property_angular_limit_lower:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **angular_limit_lower** = ``0.0`` :ref:`🔗<class_PinJoint2D_property_angular_limit_lower>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_angular_limit_lower**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_angular_limit_lower**\ (\ )
|
||
|
||
Минимальное вращение. Активно только если :ref:`angular_limit_enabled<class_PinJoint2D_property_angular_limit_enabled>` равен ``true``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PinJoint2D_property_angular_limit_upper:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **angular_limit_upper** = ``0.0`` :ref:`🔗<class_PinJoint2D_property_angular_limit_upper>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_angular_limit_upper**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_angular_limit_upper**\ (\ )
|
||
|
||
Максимальное вращение. Активно только если :ref:`angular_limit_enabled<class_PinJoint2D_property_angular_limit_enabled>` равен ``true``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PinJoint2D_property_motor_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **motor_enabled** = ``false`` :ref:`🔗<class_PinJoint2D_property_motor_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_motor_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_motor_enabled**\ (\ )
|
||
|
||
При активации двигатель поворачивает штифт.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PinJoint2D_property_motor_target_velocity:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **motor_target_velocity** = ``0.0`` :ref:`🔗<class_PinJoint2D_property_motor_target_velocity>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_motor_target_velocity**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_motor_target_velocity**\ (\ )
|
||
|
||
Целевая скорость двигателя. В радианах в секунду.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PinJoint2D_property_softness:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **softness** = ``0.0`` :ref:`🔗<class_PinJoint2D_property_softness>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_softness**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_softness**\ (\ )
|
||
|
||
Чем выше это значение, тем сильнее может быть гибка связь с закрепленным партнером.
|
||
|
||
.. |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 (Нет возвращаемого значения.)`
|