Cloth.useGravity 使用重力
var useGravity : bool
Description描述
Should gravity affect the cloth simulation?
是否重力影响布料模拟?
C#
JavaScript
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;