how to create a growing size charging energy ball?

hi there, i would like to ask how do i create a charging energy ball growing from a smaller size to a bigger size? do i do that with a script?

1 Answer

1

You need to create a particle, and then alter the properties via a script. First, you should create an energy ball that you like via Unity's Particle creation system. Go to Game Object->Create Other->Particle System.

Alter the variables of the particle to get it like you want it to look at the one end of your large/small sizes. For a lot more detailed info on how to make nice looking particles, there are a lot of tutorials around the web:

Required reading: http://unity3d.com/support/documentation/Manual/Particle%20Systems.html

Tutorials: http://forestjohnson.blogspot.com/2007/12/particle-effects-tutorial.html http://rockonflash.wordpress.com/2010/04/17/how-to-do-lasers-in-unity3d/

Now if you mess with the particle, you should be able to get it to go from a smaller size to a larger size by treating it as a "one shot." You'll have a lot more control over it if you get a reference to the particle emitter in your script, and then alter the Min/Max Energy, Min/Max Emission.

You can actually use the ParticleAnimator.sizeGrow (which is exposed in the inspector) to achieve the growing part without scripts... :)