Cloth.externalAcceleration

Unity · Версия 2020.3 LTS · Scripting · Cloth

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;
    }
}

Обновлено 17 ноября 2026 г.