Version: 2022.1

Joint

class in UnityEngine

/

继承自:Component

切换到手册

描述

Joint 是所有关节的基类。

变量

anchor约束关节运动的锚点的位置。
autoConfigureConnectedAnchor是否应自动计算 /connectedAnchor/?
axis约束身体的轴的方向。
breakForce为使此关节断开而需要施加的力。
breakTorque为破坏此关节而需要施加的扭矩。为了能够断开,必须将关节_锁定_或_限制_到施加扭矩的旋转轴上。这意味着一些关节不能断开,例如无约束的可配置关节 (Configurable Joint)。
connectedAnchor相对于连接刚体的锚点位置。
connectedArticulationBodyA reference to an articulation body this joint connects to.
connectedBody对此关节连接到的其他刚体的引用。
connectedMassScale要在解算约束之前应用于连接身体的反向质量和惯性张量的缩放比例。
currentForce解算器为满足所有约束而施加的力。
currentTorque解算器为满足所有约束而施加的扭矩。
enableCollision启用与关节连接的身体之间的碰撞。
enablePreprocessing切换此关节的预处理。
massScale要在解算约束之前应用于身体的反向质量和惯性张量的缩放比例。

消息

OnJointBreak在附加到相同游戏对象的关节断开时调用。

继承的成员

变量

gameObject此组件附加到的游戏对象。始终将组件附加到游戏对象。
tag此游戏对象的标签。
transform附加到此 GameObject 的 Transform。
hideFlags该对象应该隐藏、随场景一起保存还是由用户修改?
name对象的名称。

公共函数

BroadcastMessage调用此游戏对象或其任何子项中的每个 MonoBehaviour 上名为 methodName 的方法。
CompareTagChecks the GameObject's tag against the defined tag.
GetComponentReturns the component of type if the GameObject has one attached.
GetComponentInChildrenReturns the Component of type in the GameObject or any of its children using depth first search.
GetComponentInParentReturns the Component of type in the GameObject or any of its parents.
GetComponents返回 GameObject 中类型为 type 的所有组件。
GetComponentsInChildrenReturns all components of Type type in the GameObject or any of its children. Works recursively.
GetComponentsInParent返回 GameObject 或其任何父项中类型为 type 的所有组件。
SendMessage调用此游戏对象中的每个 MonoBehaviour 上名为 methodName 的方法。
SendMessageUpwards调用此游戏对象中的每个 MonoBehaviour 上或此行为的每个父级上名为 methodName 的方法。
TryGetComponent获取指定类型的组件(如果存在)。
GetInstanceIDGets the instance ID of the object.
ToString返回对象的名称。

静态函数

Destroy移除 GameObject、组件或资源。
DestroyImmediate立即销毁对象 /obj/。强烈建议您改用 Destroy。
DontDestroyOnLoad在加载新的 Scene 时,请勿销毁 Object。
FindObjectOfType返回第一个类型为 type 的已加载的激活对象。
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiate克隆 original 对象并返回克隆对象。

运算符

bool该对象是否存在?
operator !=比较两个对象是否引用不同的对象。
operator ==比较两个对象引用,判断它们是否引用同一个对象。
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961