Rigidbody.Sleep 休眠

function Sleep () : void

Description描述

Forces a rigidbody to sleep at least one frame.

强制一个刚体休眠至少一帧。

A common use is to call this from Awake in order to make a rigidbody sleep at startup.

一个常见的用途是从Awake中调用它以便使刚体在启用的时候休眠。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		rigidbody.Sleep();
	}
}
rigidbody.Sleep();
Page last updated: 2011-2-10