Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

Cloth.externalAcceleration

マニュアルに切り替える
public Vector3 externalAcceleration;

説明

一定の外部の加速度が布に適用されます。

旗がなびくような布に一定の力を加えるシミュレートを行うために使用します。 See Also: Cloth.randomAcceleration.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { transform.GetComponent<Cloth>().externalAcceleration = -Physics.gravity / 2; } }