mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
161 lines
6.4 KiB
ReStructuredText
161 lines
6.4 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_Joint3D:
|
||
|
||
Joint3D
|
||
=======
|
||
|
||
**继承:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
**派生:** :ref:`ConeTwistJoint3D<class_ConeTwistJoint3D>`, :ref:`Generic6DOFJoint3D<class_Generic6DOFJoint3D>`, :ref:`HingeJoint3D<class_HingeJoint3D>`, :ref:`PinJoint3D<class_PinJoint3D>`, :ref:`SliderJoint3D<class_SliderJoint3D>`
|
||
|
||
所有 3D 物理关节的抽象基类。
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
描述
|
||
----
|
||
|
||
3D 物理中所有关节的抽象基类。3D 关节将两个物理体(\ :ref:`node_a<class_Joint3D_property_node_a>` 和 :ref:`node_b<class_Joint3D_property_node_b>`\ )绑定在一起并应用约束。如果仅定义一个物体,则将其附加到固定的 :ref:`StaticBody3D<class_StaticBody3D>` 上,而没有碰撞形状。
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
教程
|
||
----
|
||
|
||
- `3D 货车镇演示 <https://godotengine.org/asset-library/asset/2752>`__
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
属性
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------------+------------------------------------------------------------------------------------------+------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`exclude_nodes_from_collision<class_Joint3D_property_exclude_nodes_from_collision>` | ``true`` |
|
||
+---------------------------------+------------------------------------------------------------------------------------------+------------------+
|
||
| :ref:`NodePath<class_NodePath>` | :ref:`node_a<class_Joint3D_property_node_a>` | ``NodePath("")`` |
|
||
+---------------------------------+------------------------------------------------------------------------------------------+------------------+
|
||
| :ref:`NodePath<class_NodePath>` | :ref:`node_b<class_Joint3D_property_node_b>` | ``NodePath("")`` |
|
||
+---------------------------------+------------------------------------------------------------------------------------------+------------------+
|
||
| :ref:`int<class_int>` | :ref:`solver_priority<class_Joint3D_property_solver_priority>` | ``1`` |
|
||
+---------------------------------+------------------------------------------------------------------------------------------+------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
方法
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------+------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`get_rid<class_Joint3D_method_get_rid>`\ (\ ) |const| |
|
||
+-----------------------+------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
属性说明
|
||
--------
|
||
|
||
.. _class_Joint3D_property_exclude_nodes_from_collision:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **exclude_nodes_from_collision** = ``true`` :ref:`🔗<class_Joint3D_property_exclude_nodes_from_collision>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_exclude_nodes_from_collision**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_exclude_nodes_from_collision**\ (\ )
|
||
|
||
如果为 ``true``\ ,则绑定在一起的两个物体不会相互碰撞。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Joint3D_property_node_a:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`NodePath<class_NodePath>` **node_a** = ``NodePath("")`` :ref:`🔗<class_Joint3D_property_node_a>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_node_a**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
|
||
- :ref:`NodePath<class_NodePath>` **get_node_a**\ (\ )
|
||
|
||
连接到关节的第一个节点(A)的路径。该节点必须继承自 :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ 。
|
||
|
||
如果留空且设置了 :ref:`node_b<class_Joint3D_property_node_b>`\ ,则该物体将连接到固定的 :ref:`StaticBody3D<class_StaticBody3D>`\ ,且没有碰撞形状。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Joint3D_property_node_b:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`NodePath<class_NodePath>` **node_b** = ``NodePath("")`` :ref:`🔗<class_Joint3D_property_node_b>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_node_b**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
|
||
- :ref:`NodePath<class_NodePath>` **get_node_b**\ (\ )
|
||
|
||
连接到关节的第二个节点(B)的路径。该节点必须继承自 :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ 。
|
||
|
||
如果留空且设置了 :ref:`node_a<class_Joint3D_property_node_a>`\ ,则该物体将连接到固定的 :ref:`StaticBody3D<class_StaticBody3D>`\ ,且没有碰撞形状。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Joint3D_property_solver_priority:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **solver_priority** = ``1`` :ref:`🔗<class_Joint3D_property_solver_priority>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_solver_priority**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_solver_priority**\ (\ )
|
||
|
||
用于定义哪个解算器在多个关节中被首先执行的优先级。数值越低,优先级越高。
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
方法说明
|
||
--------
|
||
|
||
.. _class_Joint3D_method_get_rid:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_Joint3D_method_get_rid>`
|
||
|
||
从 :ref:`PhysicsServer3D<class_PhysicsServer3D>` 返回关节的内部 :ref:`RID<class_RID>`\ 。
|
||
|
||
.. |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 (无返回值。)`
|