Questions about Unity Emission Shapes vs. Initial Velocity

I want to throw out some questions about Unity’s emission shapes that are driving me crazy… Namely, is it really not possible to use a box emitter shape and have particles emit outwards from all sides? How do I control the direction the particles are going at birth while using a box? Or any other type of shape for that matter?

It seems like they all have somewhat arbitrary emission velocities, which really shouldn’t be tied to the shape of their emission volume that explicitly…

/rant.

For emitting outwards from all sides:
First way - Just check the random direction checkbox under Shape rollout
Second way - Set the start speed to zero and then enable Velocity Over Lifetime rollout, then set it to random between two constants, then set the constants to 1,1,1 and -1,-1,-1 or similar
Third way - If you want it to emit only from the six faces of the cube and not use the entire volume of a box emitter, set the start speed to whatever you want then change the shape to Mesh under the Shape Rollout, then choose Triangle and for the mesh use the Cube mesh that ships with Unity

Controlling the initial direction can be done in so many ways I won’t list them all. Emission can be random or precise, it’s up to you.

Of course, you always have scripting if you want to do it that way but you should be able to do it with just some basic particle system settings.

1 Like

Yeah, I think your best bet is to use a custom mesh to precisely control emission position and direction.
Vertex type seems the best, because I believe Unity uses the normals to determine the spawn direction.
Sad thing is that there’s a performance hit in using mesh emission I think :confused:

Try using custom mesh box - there is no other simpler way. Unity spawns by normals of the object so custom shape will make it work.

Screen

The two options of up one axis or random direction don’t quite do this justice, but I’ll try exploring the velocity over life time so I can at least control axis individually. I’m really missing an out from center option on each axis, other distribution controls within the volume such as surface only, even, center bias, etc. and I’m still baffled by the decision to link the direction with the shape in such a limiting way. If you’ve got this procedural shape, there are so many other powerful ways to use it and give control (Growing pains as I explore and confirm to Unity’s paradigm… so this is mostly just me griping like an old man).

Meshes seem like they ultimately give the most control, yet I’m not seeing any great way to scale the base mesh (only glanced, so I’m hoping I just missed something), and it’s a shame to have to pay that cost.

Thanks for the guidance everyone!

If you set the Scaling Mode to Shape in the initial tab, then the Transform’s Scale will only affect the emitting shape (so the mesh if you’re using that shape).

Fun fact: that was the default behavior in Shuriken when it was released, and the ability to actually scale a whole particle system has been missing for years! (it’s only been introduced recently in Unity 5.3)

1 Like

That’ll probably help, although I think I may need my effect transforms for other purposes on our generic effects, so I may not be able to use that either.

P.S. I’m really feeling the need to explore making my own components…

Regarding scaling the mesh without actually using Transform scale, another way to achieve this might be to use the Normal Offset option. This moves spawned particles along the mesh normal by the amount you specify. (Available in 5.3 onwards)