InteractiveCloth.collisionResponse 碰撞反应

var collisionResponse : float

Description描述

How much force will be applied to colliding rigidbodies?

有多少力将被应用到碰撞刚体?

If this is greater then zero, interaction of the cloth with colliding rigidbodies is enabled. The higher this value is, the greater the forces applied to rigidbodies are. It is recommended to start out with small values (like 0.2) for best results.

如果这个值大于0,布料互动带有碰撞刚体被启用。较高的值是更大的力应用到刚体。建议在开始时用小的值以取得最佳效果(如0.2)。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Awake() {
		transform.GetComponent<InteractiveCloth>().collisionResponse = 0.2F;
	}
}
// Make the cloth apply forces on what it touches.
//使布料在触到时应用力

transform.GetComponent(InteractiveCloth).collisionResponse = 0.2;
最后修改:2011年3月27日 Sunday 18:14

本脚本参考基于Unity 3.4.1f5

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