I’d like to create a burst effect that starts slowly but explodes quickly, but I haven’t found anything that can change the speed over time…
I tried these things, and none of them works:
- Velocity over Lifetime: this module messes up the direction of the burst.
- Limit Velocity over Lifetime: as it says, it only limits the velocity but never increase it. This works perfect with slowing, how about the opposite?
- Force over Lifetime: this also messes up the direction.
- Change start speed to curve instead of a constant: I cannot see the reason why it can be curve. Apparently this only sets the initial speed, and only the first point of the curve matters.
Did I miss anything? Or it’s just impossible to set the speed of particles?
I would develop your own behavior to put on your particle system. Use the :
ParticleSystem.Particle[] particles = new ParticleSystem.Particle[particleSystem.particleCount];
particleSystem.GetParticles(particles);
Now you have an array of every particle in the system. Each particle if you iterate through it can be individually changed:
for(int p = 0; p < particles.Length; p++)
{
ParticleSystem.Particle part = particles[p];
//now you can adjust anything
//part.velocity is going to be what you want but there are other adjustments to be
//made check out https://docs.unity3d.com/Documentation/ScriptReference/ParticleSystem.Particle.html
//update your array with the updated particle
particles[p] = part;
}
//set your array back to the particleSystem
particleSystem.SetParticles(particles, particles.Length);
Let me know if you have any questions about this or if this is not what you are looking for.