ドキュメント

Unity Engine

Unity Engine

randomAcceleration

A random, external acceleration applied to the cloth.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

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

Remarks

Use this to simulate randomly changing forces on the cloth, such as wind turbulences waving a flag. Additional Resources: Cloth.externalAcceleration.

Examples

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