Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


externalAcceleration

A constant, external acceleration applied to the cloth.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.ClothModule
public Vector3 externalAcceleration { get; set; }

Remarks

Use this to simulate constant forces on the cloth, such as wind waving a flag.
Additional Resources: _randomAcceleration

Examples

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