# HingeJoint 铰链关节

Inherits from Joint

The HingeJoint groups together 2 rigid bodies, constraining them to move like connected by a hinge.

This joint is great for, well, doors, but can also be used to model chains, etc...

The HingeJoint has a motor which can be used to make the hinge spin around the joints axis. A spring which attempts to reach for a target angle by spinning around the joints axis. And a limit which constrains the joint angle.

HingeJoint有一个动力，这个能够用来使链接绕着关节的轴旋转。一个弹簧，它通过绕着铰链关节轴旋转试图达到一个目标角度，和一个限制，约束关节角度。

### Variables变量

• The motor will apply a force up to a maximum force to achieve the target velocity in degrees per second.
动力将应用一个最大力来试图达到目标速度，以 度/秒 为单位。
• The limits of the hinge joint.
铰链关节的限制。
• The spring attempts to reach a target angle by adding spring and damping forces.
通过添加弹簧和阻尼力，弹簧试图达到一个目标角度。
• Enables the joint's motor.
启用关节的动力。
• Enables the joint's limits.
启用关节的限制。
• Enables the joint's spring.
启用关节的弹簧。
• The angular velocity of the joint in degrees per second.
关节的角速度，单位 度/秒。
• The current angle in degrees of the joint relative to its rest position. (Read Only)
关节的当前角度，相对于它的静止位置。（只读）

## Inherited members继承成员

### Inherited Variables继承变量

• A reference to another rigidbody this joint connects to.
这个关节连接到的另一个刚体的引用。
• The Direction of the axis around which the body is constrained.
物体被约束绕这个轴的方向。
• The Position of the anchor around which the joints motion is constrained.
关节的运动被约束绕这个锚的位置。
• The force that needs to be applied for this joint to break.
需要应用给这个关节断开的力。
• The torque that needs to be applied for this joint to break.
需要应用给这个关节断开的力矩。
• The name of the object. //物体的名字
• Should the object be hidden, saved with the scene or modifiable by the user?
物体是否被隐藏、保存在场景中或被用户修改？

### Inherited Functions继承函数

• Returns the instance id of the object.
返回物体的实例ID
• Returns the name of the game object.
返回游戏物体的名称。

### Messages Sent发送消息

• Called when a joint attached to the same game object broke.
当附加到相同游戏物体上的关节被断开时调用。

### Inherited Class Functions继承类函数

• Removes a gameobject, component or asset.
删除一个游戏物体、组件或资源
• Destroys the object obj immediately. It is strongly recommended to use Destroy instead.
立即销毁物体obj，强烈建议使用Destroy代替。
• Makes the object target not be destroyed automatically when loading a new scene.
加载新场景的时候使目标物体不被自动销毁。
• Returns the first active loaded object of Type type.
返回Type类型第一个激活的加载的物体。
• Returns a list of all active loaded objects of Type type.
返回Type类型的所有激活的加载的物体列表
• Clones the object original and returns the clone.
克隆原始物体，并返回克隆的物体
Page last updated: 2011-1-28