Cloth.randomAcceleration

切换到手册
public Vector3 randomAcceleration ;

描述

应用于布料的随机外部加速度。

使用它可模拟布料上随机变化的力,例如使旗帜飘扬的风湍流。 另请参阅:Cloth.externalAcceleration

using UnityEngine;

public class Example : MonoBehaviour { // Simulate wind going trough the X axis. void Start() { GetComponent<Cloth>().randomAcceleration = new Vector3(10, 0, 0); } }