InteractiveCloth.tearFactor 撕裂系数

var tearFactor : float

Description描述

How far cloth vertices need to be stretched, before the cloth will tear.

多大程度上布料顶点需要被拉长,在布料撕裂之前。

If this is set to zero, tearing is disabled. For values greater than zero, larger values make the cloth stretch further without tearing. This property can be changed dynamically, but turning it on or off completely (by setting it to zero or non-zero), will cause the cloth simulation to reset.

如果设置为0,撕裂比禁用。对于大于0的值,较大的值,使布料拉伸不容易撕裂。这个属性可以被动态改变,但打开或完全关闭(通过设置0或非0的值),将导致布料模拟复位。

参见:isTeared 变量

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Awake() {
		transform.GetComponent<InteractiveCloth>().tearFactor = 0.1F;
	}
}
// Simulate a really thin/aged and fragile cloth that will tear with anything
//模拟一个非常薄而旧并且脆弱的布料,将很容易撕裂

transform.GetComponent(InteractiveCloth).tearFactor = 0.1;
Page last updated: 2011-3-27