Unity3D学习笔记_粒子系统
操作 08-01,粒子系统属性与主要子模块
使用 菜单 -> GameObject -> Effects -> Particle System 在游戏对象场景中添加一个 Particle System。
 
粒子动画的参数:
- Duration 发射器喷粒子的时间长度
- Looping 如果启用此属性,系统将在其持续时间结束时再次启动并继续重复该循环
- Prewarm 如果启用此属性,系统将初始化,就像已经完成一个完整周期一样(仅当 Looping 也启用时才有效)
- Start Lifetime 粒子的初始生命周期
- Start Speed 每个粒子在 适当方向 的初始速度

Emission 模块 , 此模块中的属性会影响粒子系统发射的速率和时间。其中有一个突发发射配置表
Shape 模块,此模块用于定义可发射粒子的体积或表面以及起始速度的方向。
 在上面的基础上调整做出下雪效果:
- 在原参数main 模块,设置start size = 0.2
- 选择 Transform 组件,使得粒子系统 position y = 10, rotate x = 90 (Z 轴向下)
 勾选Size over lifetime可以调整粒子随着时间的大小变化 
08-03粒子材料与渲染
- 选择 MyEx 的 MyExposion 对象
- 选择 Inspection 面板
展开 Particle Syetem 的 Render 设置: Material 选择 Exposion2 材料,观察到 66 的面片飞出 Render 模式选择 Vertical Biliboard Max Parricle Size 设置成 5 展开 Texture Sheet Animation, 选择动画设置 Tiles 设置为 66 选择 Frame over Time, 在最下面有曲线编辑器,最终结果如图所示 

取消 Shape 则发射成直线 选择并展开 Emission 设置 Rate Over Time 为 1000

1.展开 particle 主控 2.设置 Duration 为 1 3.设置 Start Lifetime 为 1.5 4.设置 Start Speed 为 0 5.设置 Start Size 为 6 6.设置 Scaling Mode 为 Shape 7.设置 Max Particles 为 4 8.设置 Looping 为 false

|