Version: 2022.3
Inherit Velocity 模块
Force over Lifetime module

Lifetime by Emitter Speed module

该模块根据粒子生成时发射器的速度控制每个粒子的初始生命周期。它将粒子的初始生命周期乘以一个值,该值取决于产生它们的对象的速度。对于大多数粒子系统,此为游戏对象速度,但对于子发射器,速度来自子发射器粒子所源自的父粒子。

Using the Lifetime by Emitter 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 Lifetime by Emitter Speed module to the Particle System. By default, Unity disables this module. To create a new Particle System and enable this module:

  1. Click GameObject > Effects > Particle System.
  2. In the Inspector, find the Particle System component.
  3. In the Particle System component, find the Lifetime by Emitter Speed module fold-out.
  4. To the left of the fold-out header, enable the checkbox.

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 Lifetime by Emitter Speed module API documentation.

属性

For some properties in this section, you can use different modes to set their value. For information on the modes you can use, see Varying properties over time.

属性 功能
Multiplier 应用于粒子初始生命周期的乘数。该模块根据您设置的曲线模式以不同的方式使用此值。曲线模式为:
&# 8226; Constant:使用您为此属性设置的常数乘数值。使用此曲线模式会忽略 Speed Range 属性。
Curve:获取发射器的速度,根据 Speed Range 将其映射到 0 到 1 之间的值,然后使用归一化值对曲线进行采样。
Random Between Two Constants:为每个粒子设置介于您为此属性设置的两个值之间的随机乘数。使用此曲线模式会忽略 Speed Range 属性。
Random Between Two Curves:获取发射器的速度,根据 Speed Range 将其映射到 0 到 1 之间的值,然后使用归一化值对每条曲线进行采样。对于每个粒子,该模块将乘数设置为两个样本之间的随机值。
Speed Range 粒子系统映射到 Multiplier 曲线的值的最小和最大发射器速度。如果发射器的速度等于第一个值,则乘数是曲线起始处的值。如果发射器的速度等于第二个值,则乘数是曲线末端的值。
此属性仅在 Multiplier 的曲线模式设置为 Curve 或者 Random Between Two Curves 时才相关。
Inherit Velocity 模块
Force over Lifetime module