Version: 2022.1
言語: 日本語
Color over Lifetime module
Size Over Lifetime モジュール

Color by Speed module

毎秒の距離ユニットの速度にもとづいて変化するように、パーティクルの色をこのモジュールで設定できます。

Using the Color by Speed module

This module is part of the Particle System component. When you create a new Particle System GameObject, or add a Particle System component to an exiting GameObject, Unity adds the Color by Speed module to the Particle System. By default, Unity disables this module. To create a new Particle System and enable this module:

  1. GameObject > Effects > Particle System をクリックします。
  2. Inspector 内で Particle System コンポーネントを見つけます。
  3. In the Particle System component, find the Color by Speed module fold-out.
  4. 折り畳みメニューのヘッダーの左側にあるチェックボックスを有効にします。

API

Since this module is part of the Particle System component, you access it through the ParticleSystem class. For information on how to access it and change values at runtime, see the Color by Speed module API documentation.

プロパティ

このセクション内の一部のプロパティでは、異なるモードを使用して値の設定が行えます。使用可能なモードについての詳細は、Varying properties over time を参照してください。

プロパティ 機能
Color Speed Range で定義されているパーティクルのカラーグラデーション
スピード範囲 速度範囲の最大値と最小値。カラーグラデーションはこの速度範囲にマップされます(範囲外の速度のパーティクルはグラデーションの端にマップされます)。

説明

スパークの様に、燃えたり光ったりするパーティクルでは、空気中を素早く移動する際により明るく燃え上がる傾向にあります(より多くの酸素に触れるからです)が、その後動きが遅くなるにつれてほのかに薄暗くなります。このことをシミュレートするために、速度範囲の最大値に白、最小値に赤のグラデーションをもつ Color By Speed を使用します (スパークの例では、動きの早いパーティクルは白く、遅いパーティクルは赤く見えます)。

Color over Lifetime module
Size Over Lifetime モジュール