mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
182 lines
6.6 KiB
ReStructuredText
182 lines
6.6 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_PinJoint3D:
|
||
|
||
PinJoint3D
|
||
==========
|
||
|
||
**繼承:** :ref:`Joint3D<class_Joint3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
將兩個 3D 物理體通過單點進行連接的物理關節,能夠讓它們自由旋轉。
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
說明
|
||
----
|
||
|
||
將兩個 2D 物理體通過單點進行連接的物理關節,能夠讓它們自由旋轉。例如可以將 :ref:`RigidBody3D<class_RigidBody3D>` 連接到 :ref:`StaticBody3D<class_StaticBody3D>` 上,從而建立鐘擺或蹺蹺板。
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
屬性
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------+-----------------------------------------------------------------------------+---------+
|
||
| :ref:`float<class_float>` | :ref:`params/bias<class_PinJoint3D_property_params/bias>` | ``0.3`` |
|
||
+---------------------------+-----------------------------------------------------------------------------+---------+
|
||
| :ref:`float<class_float>` | :ref:`params/damping<class_PinJoint3D_property_params/damping>` | ``1.0`` |
|
||
+---------------------------+-----------------------------------------------------------------------------+---------+
|
||
| :ref:`float<class_float>` | :ref:`params/impulse_clamp<class_PinJoint3D_property_params/impulse_clamp>` | ``0.0`` |
|
||
+---------------------------+-----------------------------------------------------------------------------+---------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
方法
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_param<class_PinJoint3D_method_get_param>`\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`\ ) |const| |
|
||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_param<class_PinJoint3D_method_set_param>`\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) |
|
||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
列舉
|
||
----
|
||
|
||
.. _enum_PinJoint3D_Param:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **Param**: :ref:`🔗<enum_PinJoint3D_Param>`
|
||
|
||
.. _class_PinJoint3D_constant_PARAM_BIAS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Param<enum_PinJoint3D_Param>` **PARAM_BIAS** = ``0``
|
||
|
||
被釘在一起的物體之間保持位置關係的力,越高越強。
|
||
|
||
.. _class_PinJoint3D_constant_PARAM_DAMPING:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Param<enum_PinJoint3D_Param>` **PARAM_DAMPING** = ``1``
|
||
|
||
被釘在一起的物體之間保持共速的力。越高,力越大。
|
||
|
||
.. _class_PinJoint3D_constant_PARAM_IMPULSE_CLAMP:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Param<enum_PinJoint3D_Param>` **PARAM_IMPULSE_CLAMP** = ``2``
|
||
|
||
如果大於 0,則這個值是此 Joint3D 產生的脈衝的最大值。
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
屬性說明
|
||
--------
|
||
|
||
.. _class_PinJoint3D_property_params/bias:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **params/bias** = ``0.3`` :ref:`🔗<class_PinJoint3D_property_params/bias>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`\ ) |const|
|
||
|
||
被釘在一起的物體之間保持位置關係的力,越高越強。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PinJoint3D_property_params/damping:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **params/damping** = ``1.0`` :ref:`🔗<class_PinJoint3D_property_params/damping>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`\ ) |const|
|
||
|
||
被釘在一起的物體之間保持共速的力。越高,力越大。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PinJoint3D_property_params/impulse_clamp:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **params/impulse_clamp** = ``0.0`` :ref:`🔗<class_PinJoint3D_property_params/impulse_clamp>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`\ ) |const|
|
||
|
||
如果大於 0,則這個值是此 Joint3D 產生的脈衝的最大值。
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
方法說明
|
||
--------
|
||
|
||
.. _class_PinJoint3D_method_get_param:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`\ ) |const| :ref:`🔗<class_PinJoint3D_method_get_param>`
|
||
|
||
返回指定參數的值。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PinJoint3D_method_set_param:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PinJoint3D_method_set_param>`
|
||
|
||
設定指定參數的值。
|
||
|
||
.. |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 (無回傳值。)`
|