Hi. I have a problem with a particle system, maybe you’ll be able to help me out.
I have a 2D scene with a Canvas set to Screen Space - Camera. I want to add a particle system to the Canvas and move the emitter around so it leaves a trail behind. The thing is, the camera is being moved around too, but I want the trail to stay still relative to the rest of the UI elements.
If I set simulation space to local, the particles follow the emitter which isn’t what I want. If I set it to the world they stay behind when I move the camera, which, again isn’t desirable.
I hope my explanation is clear enough. Is it possible in Unity?
Not sure if there’s a better way, but I was able to achieve this using sub-emitters. Basically, instead of a particle system that emits particles, refactor it to be a particle system that emits particle systems at the desired position in world space, which all then immediately emit a single particle in the local space of the camera.
Split your particle system into two systems (duplicate works good)
The first part controls where and how many of the child particle system to emit, set it to World Space and turn off the particle system renderer and any visual properties like color/size because this system doesn’t need it. (it doesn’t render anything)
The second part is the sub-emitter system, which should be a child of the emitting system and set to Custom Space targeting the main camera transform. Since emission rate/location is controlled by the parent system, the emission rate of the sub-emitter should be 0, with a single burst of 1 particle at 0 time. Also give the system a shape with a size close to zero.
In my case I didn’t need any directional movement but if there was that would probably require some additional tweaking.