Cloth.stretchingStiffness 韧度
var stretchingStiffness : float
Description描述
Stretching stiffness of the cloth.
布料的韧性(可拉伸的程度)
Must be greater than zero and smaller or equal to one. In many cases, when you want a cloth to be more stiff, actually reducing the number of vertices will get you better results - and performance.
必须大于0,或小于等于1。 在大多数情况下,当你想要一块比较硬的布料,实际上可以减少布料的顶点数,会得到更好的效果和性能。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
transform.GetComponent<Cloth>().stretchingStiffness = 1;
}
}
// Set the stretching Stiffness to 1 regardless if the cloth
//设置布料的stretching Stiffness为1
// is a Skinned Cloth or Interactive.
//可以是Skinned Cloth或者Interactive .
transform.GetComponent(Cloth).stretchingStiffness = 1;
最后修改:2011年1月18日 Tuesday 22:12