I am trying to find a way to emit particles in a non-random direction around and away the object.
Using the Cone shape, with an angle of 90, the particles fly away from the object, which is good. However, the particles are emitted at a random point, as seen here.
I would like the particles to emit at certain angles. One particle north, one particle north-east, one particle east, et cetera.
I created my own octogonal mesh, hoping that it would emit at all the corners, but the emission is still random.
So this is what I would like to do: https://i.stack.imgur.com/kp0VA.png
Is this possible to do, and if yes, how?
Also, while at it: Is it possible to get the parent from a sub-emitter particle? Every particle emits a small trail, but I can't seem to get a list from the sub-particles, only a list of all sub-emitter particles.
I want to color the sub-particles the same color as the parent. Is this possible?
If you just want to control the direction, using a mesh definitely works. Particles are emitted from the mesh (be it from a vertex, edge or triangle) using the mesh's normal at that point as direction (unless
Random Direction
is checked), so make sure the mesh's normals are in order. Better still, create the mesh yourself:Pay attention to the
Shape
settings in the pic. But this way you won't have any control of which one of the 8 directions each new particle takes, so it will look very patchy:If you want decent control of what's going on, hand-code it yourself using ParticleSystem.Emit()
Edit: The
Emit (Particle particle)
overload is wrong in the docs. Emit uses UnityEngine.ParticleSystem.Particle, not the legacy UnityEngine.Particle. It's... very confusing. I was just working with particles and this gave me a lot of trouble until I decompiled UnityEngine and saw the input parameters myself.