最近比較悠閒,就從新看了一遍例子系統,感受能把效果作的炫酷對於初學者來講並非一件容易的事,可是回頭想一想,最重要的緣由可能仍是沒有把Particle Systems組件研究透吧,溫故而知新,一塊兒複習一下粒子系統吧。app
下面是Unity5.5.0版本的粒子系統官方文檔的翻譯dom
這個模塊包含全局屬性,影響全局系統。oop
Property: | Function: |
---|---|
Duration//持續 |
整個粒子系統運行的時間 |
Looping//循環 |
若是啓用,系統將在其持續時間結束時再次啓動並繼續重複循環 |
Prewarm//預熱 |
若是啓用,系統將被初始化,好像它已經完成了一個完整的循環(only works if Looping is also enabled). |
Start Delay//延遲啓動 |
Delay in seconds before the system starts emitting once enabled. |
Start Lifetime//生命週期 |
The initial lifetime for particles. |
Start Speed |
每一個粒子在適當方向上的初始速度 |
3D Start Size | 控制各個軸的尺寸 |
Start Size | The initial size of each particle.//initial初始 |
3D Start Rotation | Enable this if you want to control the rotation of each axis seperately. |
Start Rotation | The initial rotation angle of each particle. |
Randomize Rotation Direction//隨機旋轉方向 |
致使一些粒子在相反方向旋轉 |
Start Color | The initial color of each particle. |
Gravity Modifier//重力修改 |
Scales the gravity value set in the physics manager. A value of zero will switch gravity off. |
Simulation Space//模擬空間 |
Toggles whether particles are animated in the parent object’s local space (therefore moving with the parent object) or in the world space. |
Scaling Mode//擴展模式 |
Use the scale from the transform. Set to Hierarchy, Local or Shape. Local applies only the particle system transform scale. Shape mode applies only the scale to the start position of the particles. |
Play on Awake | If enabled, the particle system starts automatically when the object is created. |
Max Particles//最大粒子數 |
The maximum number of particles in the system at once. Older particles will be removed when the limit is reached.委婉 |
【Emission module】動畫
這個模塊的屬性影響粒子系統發射的速度和時間。this
Property | Function |
---|---|
Rate over Time | 單位的時間發出的粒子數。 |
Rate over Distance | 單位的移動距離發出的粒子數。 |
Bursts//爆發,爆炸 | 粒子爆炸事件。這些設置容許粒子在指定的時間發出。 |
Time | 粒子爆發的時間,單位秒。 |
Min | 爆發粒子數最小值。 |
Max | 爆發粒子數最大值。 |
Cycles | 爆發多少次。 |
Interval | 每一次爆發的時間間隔,單位秒。 |
【Particle System Shape Module】spa
這個模塊定義了粒子能夠從什麼形狀中發射以及起始速度的方向。pwa
Property | Function |
---|---|
Shape//形狀 | 發射體的形狀 |
Sphere | 各個方向均勻發射 |
Hemisphere//半球 | 在一個面的一側,各個方向均勻發射 |
Cone//錐體 | 以錐體的形式發射 |
Box | 以箱體的形式發射,粒子沿着發射器的Z軸移動 |
Mesh | 以網格的形式發射。選這個模式有一個額外的菜單,用於選擇是從網格頂點、三角形、或者邊緣發射粒子 |
MeshRenderer | Emission from a reference to a GameObject’s Mesh Renderer. |
SkinnedMeshRenderer | Emission from a reference to a GameObject’s Skinned Mesh Renderer. |
Circle | Uniform emission from the centre of edge of a circle. The particles move only in the plane of the circle. |
Edge | Emission from a line segment. The particles move in the emitter object’s upward (Y) direction. |
Angle (Cone only) |
The angle of the cone at its point. An angle of 0 produces a cylinder while an angle of 90 gives a flat disc. |
Radius (Sphere, Hemisphere, Cone, Circle and Edgeonly) |
The radius of the circular aspect of the shape. |
Length (Cone only, when using one of the volume Emit from modes) |
The length of the cone. |
Box X, Y, Z (Box only) |
Width, height and depth of the box shape. |
Mesh (Mesh, MeshRenderer and SkinnedMeshRenderer only) |
The Mesh that provides the emitter’s shape. |
Emit from Shell (Sphere and Hemisphere only) |
Enable this to make particles be emitted from the outer surface rather than the inner volume of the shape. |
Emit from (Cone only) |
Selects the part of the cone to emit from: Base, Volume, Base Shell or Volume Shell. |
Arc (Circle only) |
The angular portion of a full circle that forms the emitter’s shape. |
Emit From Edge (Circle only) |
Enable this to make particles be emitted from the edge of the circle rather than the centre. |
Single Material | Should the particles be emitted from a particular sub-Mesh (identified by the material index number). If enabled, a numeric field is shown allowing you to specify the material index number. |
Use Mesh Colors | Use, or disregard, Mesh colors. |
Normal Offset | Distance away from the surface of the Mesh to emit particles (in the direction of the surface normal) |
Align to Direction | This will cause particles to be rotated based on their initial direction of travel. To apply a custom rotation direction on top of this setting, configure the Start Rotation setting in the Main module. |
Random Direction | When enabled, the particles’ initial direction will be chosen randomly. |