Version: 2022.3

Cloth.externalAcceleration

切换到手册
public Vector3 externalAcceleration ;

描述

约束,应用于布料的外部加速度。

使用它可模拟布料上的恒定力,例如使旗帜飘扬的风。 另请参阅:Cloth.randomAcceleration

using UnityEngine;

public class Example : MonoBehaviour { // Make this cloth fall at half speed (if is affected by gravity). void Start() { GetComponent<Cloth>().externalAcceleration = -Physics.gravity / 2; } }