找回密碼
 注冊帳號

掃一掃,訪問微社區

collider.material 材質

2015-1-4 17:27| 發布者: 楊炎| 查看: 2508| 評論: 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;

相關閱讀

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