Unity3D基础教程2-6:粒子系统(Particle Systems)

2014-08-08 18:29:40|?次阅读|上传:huigezrx【已有?条评论】发表评论

关键词:Unity3D, 游戏, 虚拟现实|来源:唯设编程网

Animating Color 动画颜色

If you would like your particles to change colors or fade in/out, enable them to Animate Color and specify the colors for the cycle. Any particle system that animates color will cycle through the 5 colors you choose. The speed at which they cycle will be determined by the Emitter's Energy value.

若你希望你的粒子更改颜色或渐显/淡出,启用它们的Animate Color 并指定颜色的循环周期。任何的粒子系统使用你所选择的5种颜色进行动画颜色的循环。它们的循环速度由发射器的Energy值决定。

If you want your particles to fade in rather than instantly appear, set your first or last color to have a low Alpha value.

若你想你的粒子渐显而不理解显示,设置你的第一或最后一个颜色为Alpha值

Unity3D基础教程2-4:粒子系统(Particle Systems)
An Animating Color Particle System 一个动画颜色粒子系统

Rotation Axes 旋转轴(坐标)

Setting values in either the Local or World Rotation Axes will cause all spawned particles to rotate around the indicated axis (with the Transform's position as the center). The greater the value is entered on one of these axes, the faster the rotation will be.

无论设置本地或全局旋转坐标将导致所有产生粒子围绕坐标旋转(以Transform的中心坐标)值越大进入这些坐标的粒子旋转越快。

Setting values in the Local Axes will cause the rotating particles to adjust their rotation as the Transform's rotation changes, to match its local axes.

设置本地值将导致旋转粒子以Transform的旋转改变排列一适应本地的坐标。

Setting values in the World Axes will cause the particles' rotation to be consistent, regardless of the Transform's rotation.

设置全局值将导致粒子的旋转的一致,不管以Transform的旋转。

Forces & Damping 强制与衰减

You use force to make particles accelerate in the direction specified by the force.

你使用强制去处理粒子加速由强制指定的方向。

Damping can be used to decelerate or accelerate without changing their direction:

衰减用于处理加速或减速而不改变它们的方向

  • A value of 1 means no Damping is applied, the particles will not slow down or accelerate.
  • 值为1表示无衰减使用,这些粒子将不会减慢或加速
  • A value of 0 means particles will stop immediately.
  • 设为0表示粒子将立即停止
  • A value of 2 means particles will double their speed every second.
  • 设为2表示粒子将在每秒钟获得两倍的速度

Destroying GameObjects attached to Particles

销毁附加粒子的游戏物体

You can destroy the Particle System and any attached GameObject by enabling the AutoDestruct property. For example, if you have an oil drum, you can attach a Particle System that has Emit disabled and AutoDestruct enabled. On collision, you enable the Particle Emitter. The explosion will occur and after it is over, the Particle System and the oil drum will be destroyed and removed from the scene.  

你可以销毁通过启用AutoDestruct属性的粒子系统和任何附加的游戏物体。例如,若你有一个油桶,你可以附加一个发射禁止和自动销毁启用的粒子系统。在碰撞时,你启动粒子发射器。当爆炸发生结束后,粒子系统和油桶将销毁并从场景中移除。

。Note that automatic destruction takes effect only after some particles have been emitted. The precise rules for when the object is destroyed when AutoDestruct is on:

注意当一些粒子发射后自动销毁的效果就生效。这个精确规则为:当AutoDestruct 开启,物体就销毁

If there have been some particles emitted already, but all of them are dead now, or

If the emitter did have Emit on at some point, but now Emit is off.

如有一些粒子已经发射,但它们现在都死了或这个发射器在一些其它位置在发射,就关闭现在的发射。

Hints 提示

  • Use the Color Animation to make your particles fade in & out over their lifetime - otherwise, you will get nasty-looking pops.
  • 使用颜色动画让你的粒子进行渐显和对它们的生命周期处理,否则,你将持久性的污染投影
  • Use the Rotation Axes to make whirlpool-like swirly motions.
  • 使用旋转坐标去处理旋窝般的动作。

Particle Collider 粒子碰撞

The World Particle Collider is used to collide particles against other Colliders in the scene.

全局粒子碰撞通常用于在场景中与其它粒子碰撞。

Unity3D基础教程2-4:粒子系统(Particle Systems)
A Particle System colliding with a Mesh Collider  一个粒子系统碰撞的网格碰撞

Properties 属性

Bounce Factor

弹跳因子

Particles can be accelerated or slowed down when they collide against other objects. This factor is similar to the Particle Animator's Damping property.

当它们与其它物体碰撞时,这些粒子可以加速或放慢速度。这一因素与 Particle Animator's Damping 属性相似

Collision Energy Loss

碰撞能量损失

Amount of energy (in seconds) a particle should lose when colliding. If the energy goes below 0, the particle is killed.

当碰撞是,这些碰撞的粒子应失去能量(以秒计),若能力低于0的粒子就被杀死

Min Kill Velocity

最小杀死速度

If a particle's Velocity drops below Min Kill Velocity because of a collision, it will be eliminated.

若一个粒子的速度减低到最小杀死速度,因碰撞的原因,它将被淘汰

Collides with

与碰撞

Which Layers the particle will collide against.

每个阶层的俩字会相互碰撞

Send Collision Message

发送碰撞消息

If enabled, every particle sends out a collision message that you can catch through scripting.

若启用,每个粒子向外发送一个碰撞消息,你可以通过脚本抓取

Details 详细资料

To create a Particle System with Particle Collider:

建立一个粒子碰撞系统:

  1. Create a Particle System using GameObject->Create Other->Particle System

建立一个粒子系统,使用菜单 游戏物体—>建立其它 —>粒子系统

  1. Add the Particle Collider using Component->Particles->World Particle Collider

添加碰撞粒子,使用菜单 组件—>粒子 —>全局粒子碰撞

发表评论0条 】
网友评论(共?条评论)..
Unity3D基础教程2-6:粒子系统(Particle Systems)