Cloth.damping 阻尼
var damping : float
Description描述
Damp cloth motion.
布料运动时的阻尼
Set this to damp the motions of a cloth instance. Must be between zero and one. Setting this to zero will disable cloth damping.
设置布料物体运动时的阻尼。必须在0~1之间,设置为0时,关闭布料的阻尼属性。
C#
JavaScript
using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {transform.GetComponent<Cloth>().damping = 1;}}
// Set the damping to 1 regardless if the cloth//设置布料的damping为1// is a Skinned Cloth or Interactive.//可以是Skinned Cloth或者Interactive .transform.GetComponent(Cloth).damping = 1;