MagicaWindZone

Properties


mode

public enum Mode
{
  /// <summary>
  /// 領域を持たない全体に影響する風
  /// Wind that affects the whole without area.
  /// </summary>
  GlobalDirection = 0,

  /// <summary>
  /// 球型の領域を持つ方向風
  /// Directional wind with spherical area.
  /// </summary>
  SphereDirection = 1,

  /// <summary>
  /// ボックス型の領域を持つ方向風
  /// </summary>
  BoxDirection = 2,

  /// <summary>
  /// 球型の領域を持つ放射風
  /// Directional wind with box area.
  /// </summary>
  SphereRadial = 10,
}

/// <summary>
/// Zone mode.
/// [OK] Runtime changes.
/// </summary>
public Mode mode = Mode.GlobalDirection;

size

/// <summary>
/// Box size.
/// [OK] Runtime changes.
/// </summary>
public Vector3 size = new Vector3(10.0f, 10.0f, 10.0f);

radius

/// <summary>
/// Sphere size.
/// [OK] Runtime changes.
/// </summary>
public float radius = 10.0f;

main

/// <summary>
/// メイン風力
/// main wind (m/s).
/// [OK] Runtime changes.
/// </summary>
[Range(0, 30)]
public float main = 5.0f;

turbulence

/// <summary>
/// 乱流率
/// turbulence rate.
/// [OK] Runtime changes.
/// </summary>
[Range(0.0f, 1.0f)]
public float turbulence = 1.0f;

directionAngleY

/// <summary>
/// 風の方向X角度(ローカル角度)
/// wind direction x angle (local angle).
/// [OK] Runtime changes.
/// </summary>
[Range(-180, 180)]
public float directionAngleX = 0;

directionAngleX

/// <summary>
/// 風の方向Y角度(ローカル角度)
/// wind direction y angle (local angle).
/// [OK] Runtime changes.
/// </summary>
[Range(-180, 180)]
public float directionAngleY = 0;

attenuation

/// <summary>
/// 放射風の減衰
/// Radiation wind attenuation.
/// [OK] Runtime changes.
/// </summary>
public AnimationCurve attenuation = AnimationCurve.EaseInOut(0.0f, 1.0f, 1.0f, 0.0f);

isAddition

/// <summary>
/// 他の風の影響を無効にせずに追加するフラグ
/// Flags to add without disabling other wind effects.
/// [OK] Runtime changes.
/// </summary>
public bool isAddition = false;

Methods


GetWindDirection

/// <summary>
/// 方向性風の風向きを取得する
/// Get the direction of the directional wind.
/// </summary>
/// <param name="localSpace"></param>
/// <returns></returns>
public Vector3 GetWindDirection(bool localSpace = false)

SetWindDirection

/// <summary>
/// 方向性風の風向きを設定する
/// Set the wind direction for directional wind.
/// </summary>
/// <param name="dir"></param>
/// <param name="localSpace"></param>
public void SetWindDirection(Vector3 dir, bool localSpace = false)