기술 자료

Unity Engine

Unity Engine

randomAcceleration

A random, external acceleration applied to the cloth.
읽는 시간 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); }}