HingeJoint.limits 限制
var limits : JointLimits
Description描述
The limits of the hinge joint.
铰链关节的限制。
The joint will be limited so that the angle is always between limits.min and limits.max. The joint angle is in degrees relative to the rest angle. The rest angle between the bodies is always zero at the beginning of the simulation.
这个链接将被限制,这样角度总是在limits.min和limits.max之间,链接的角度是相对于静止角度。两个刚体之间的静止角度在模拟开始时总是零。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
hingeJoint.limits.min = 0;
hingeJoint.limits.minBounce = 0;
hingeJoint.limits.max = 90;
hingeJoint.limits.maxBounce = 0;
}
}
// Make hinge limit for a door.
//创建用于一个门的铰链限制
hingeJoint.limits.min = 0;
hingeJoint.limits.minBounce = 0;
hingeJoint.limits.max = 90;
hingeJoint.limits.maxBounce = 0;
Modifying the limit automatically enables it.
通过设置HingeJoint.useLimits为true,修改限制为自动。
最后修改:2011年1月28日 Friday 14:57