找回密碼
 注冊帳號

掃一掃,訪問微社區

collider.istrigger 是觸發器?

2015-1-4 17:17| 發布者: 楊炎| 查看: 2117| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: collider.istrigger 是觸發器?varistrigger: booldescription描述is the collider a trigger?碰撞器是一個觸發器?a trigger doesn't collide with rigid bodies. instead it sends ontriggerenter, ontriggerexit ...

collider.istrigger 是觸發器?

varistrigger: bool

description描述

is the collider a trigger?

碰撞器是一個觸發器?

a trigger doesn't collide with rigid bodies. instead it sends ontriggerenter, ontriggerexit and ontriggerstay message when a rigidbody enters or exits the trigger.

觸發器不會與剛體碰撞。當一個剛體進入或退出觸發器,將發送ontriggerenter, ontriggerexit 和 ontriggerstay消息。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

collider.istrigger = true;

}

}

// turns the attached to collider into a trigger.

//轉換附加的碰撞器為一個觸發器

collider.istrigger = true;

相關閱讀

文章點評
相關文章
女校游泳队彩金