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;
最后修改:2011年3月27日 Sunday 18:24

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。