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;
Page last updated: 2011-3-27