var useGravity : bool
Description描述
Should gravity affect the cloth simulation?
是否重力影响布料模拟?
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
transform.GetComponent<Cloth>().useGravity = false;
}
}
// Dont use gravity on this cloth regardless if is Interactive or Skinned.
// 使布料不受重力的影响
transform.GetComponent(Cloth).useGravity = false;