__粒子动画器__随时间变化移动粒子,您可以使用它们为粒子系统应用风效、拖曳和颜色循环。
属性: | 功能: |
---|---|
Does Animate Color | 如果启用此属性,粒子将在生命周期中循环显示颜色。 |
Color Animation | 5 种颜色的粒子轮动。所有粒子都要经历此循环;如果一些粒子的寿命比其他粒子短,它们的动画速度将更快。 |
World Rotation Axis | 粒子旋转时所围绕的世界空间轴(可选)。使用此属性可营造高级魔法效果或给腐蚀性气泡增添动感。 |
Local Rotation Axis | 粒子旋转时所围绕的局部空间轴(可选)。使用此属性可营造高级魔法效果或给腐蚀性气泡增添动感。 |
Size Grow | 使用此属性可让粒子在其生命周期内增大。随着随机作用力将粒子散开,让粒子变大通常是很好的做法,这样粒子就不会崩裂。可使用此属性使烟雾上升、模拟风效等。 |
Rnd Force | 每帧都会向粒子添加的随机作用力。使用此属性可使烟雾变得更有活力。 |
Force | 每帧施加到粒子上的作用力(采用世界单位)。 |
Damping | 粒子在每帧的减速程度。值为 1 表示没有阻尼,而更小的值表示减速。 |
Autodestruct | 如果启用此属性,当所有粒子消失时,附加到粒子动画器的游戏对象将被销毁。 |
粒子动画器可让粒子系统实现动态变化。使用粒子动画器可更改粒子的颜色、施加作用力和旋转以及选择是否在完成发射时销毁它们。有关粒子系统的更多信息,请参阅网格粒子发射器、椭圆粒子发射器和粒子渲染器。
如果希望粒子改变颜色或淡入/淡出,请为它们启用 Animate Color 属性并指定循环的颜色。需要颜色动画的粒子系统将循环显示您选择的 5 种颜色。循环速度将取决于发射器的 Energy 值。
如果您希望粒子淡入而不是立即显示,请将第一个或最后一个颜色的 Alpha 值设置为较低值。
在 Local 或 World Rotation Axes 中设置相应的值将使所有生成的粒子围绕指示的轴旋转(以__变换 (Transform)__ 的位置为中心)。在其中一个轴上输入的值越大,旋转速度越快。
在 Local Axes 中设置相应的值将使正在旋转的粒子在变换 (Transform) 的旋转改变时调整其旋转,从而匹配其局部轴。
在 World Axes 中设置相应的值将使粒子的旋转始终保持一致,无论变换 (Transform) 的旋转如何变化都是如此。
使用作用力可使粒子在作用力指定的方向上加速。
阻尼 (Damping) 可用于减速或加速而不改变方向:
通过启用 AutoDestruct 属性即可销毁粒子系统和任何附加的__游戏对象。例如,如果有一个油桶,则可以附加一个禁用 Emit__ 且启用 AutoDestruct 的粒子系统。碰撞时,启用粒子发射器。爆炸将发生,此过程结束后,粒子系统和油桶将被销毁并从场景中移除。
请注意,自动销毁仅在发出一些粒子后才会生效。启用 AutoDestruct 的情况下,销毁对象的时间的准确规则如下:
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.