找回密碼
 注冊帳號

掃一掃,訪問微社區

cloth.thickness 厚度

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

摘要: cloth.thickness 厚度varthickness: floatdescription描述the thickness of the cloth surface.布料表面的厚度this is the distance kept between any cloth vertex and and other collider (or other cloth vertex ...

cloth.thickness 厚度

varthickness: float

description描述

the thickness of the cloth surface.

布料表面的厚度

this is the distance kept between any cloth vertex and and other collider (or other cloth vertex if self-collision is enabled). any object closer then this distance will collide with the cloth. if this value is too low, you may see the edges of objects intersecting the cloth surface. if this value is too high, you may see noticable distance between the cloth surface and colliding objects or stiffness in cloth motion if self-collision is enabled. must be larger then zero.

這是用來控制布料物體和碰撞物體(或者是布料物體,如果開啟自身碰撞的話)之間距離的參數。任何一個物體與布料物體的距離接近這個值,那么則會產生碰撞。如果這個值過低,物體邊緣會與布料表面交叉;如果該值太高,會明顯看到布料與碰撞物體自己的縫隙,或者布料物體在開啟自身碰撞時,運動不自然。這個值必須在0~1之間。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

transform.getcomponent().thickness = 0.2f;

}

}

transform.getcomponent(cloth).thickness = 0.2;

文章點評
女校游泳队彩金