找回密码
 注册帐号

扫一扫,访问微社区

collider.material 材质

2015-1-4 17:27| 发布者: 杨炎| 查看: 2542| 评论: 0|原作者: 蛮牛|来自: unity3d脚本manual

摘要: collider.material 材质varmaterial: physicmaterialdescription描述the material used by the collider.碰撞器使用的材质。if material is shared by colliders, it will duplicate the material and assign it to ...

collider.material 材质

varmaterial: physicmaterial

description描述

the material used by the collider.

碰撞器使用的材质。

if material is shared by colliders, it will duplicate the material and assign it to the collider.

如果材质被碰撞器共享,它将复制材质并指定给碰撞器。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

collider.material.dynamicfriction = 0;

collider.material.staticfriction = 0;

}

}

// makes the collider act like ice.

//让碰撞器像冰一样

collider.material.dynamicfriction = 0;

collider.material.staticfriction = 0;

相关阅读

文章点评
相关文章