collider.istrigger 是触发器?

2015-1-4 17:17| 发布者: 杨炎| 查看: 1849| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本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;

相关阅读

文章点评
相关文章