static var sleepVelocity : float
Description描述
The default linear velocity, below which objects start going to sleep (default 0.15). Must be positive.
如果物体的线速度在这个速度设定值之下,物体将进入静止状态。默认0.15。取值范围0到无穷大。必须为正数。
See Rigidbody Sleeping for more information. This value can be overridden per rigidbody using Rigidbody.sleepVelocity.
参照Rigidbody Sleeping 获取更多信息。用Rigidbody.sleepVelocity可以对每个物体分别设定sleepVelocity值。
This value is usually changed in Edit->Project Settings->Physics inspector instead of from scripts.
这个值常在Edit->Project Settings->Physics 菜单下设定,而不用在脚本中。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Awake() {
Physics.sleepVelocity = 0.1F;
}
}
Physics.sleepVelocity = 0.1;