Particles emitted forwards and backwards

For a training game, I need to have particles emitting from a vehicle. A large cloud needs to emit “forward” as the vehicle moves, and a smaller cloud emits “backwards”. I cannot attach two emitters to the same vehicle. If the vehicle is facing “z” both clouds need to extend the same distance ±x (above and below the vehicle) but the cloud going forward should be about three times the size of the cloud going backwards.

I believe I can create an empty object, attach the second emitter, renderer, collider, and animator to it, and child it to the vehicle. Is that the best way to do this, or is there a way to fiddle with the random numbers to create the two clouds of particles I need?

1 Answer

1

Yes, you can and should put the PE’s in separate game objects, each parented to the vehicle object. You can have as many PE’s on that as you want.

....and you don't have to build it from an empty, as you describe. Under gameObject-> CreateOther -> ParticleEmitter. Unity will make all the parts for you.

Use localVelocity instead of worldVelocity (in the Particle emitter settings.)

I figured out local instead of world. I had some other art related issues that I'm working around (wacky artist delivered vehicles with different origin points) and I may have to go to four PEs instead of two in order to get the clouds to look right, but I'll worry about that after the subject matter experts review it. Thanks for your help.

One other note: everything I'm working with is prefabs, which the artist built using other prefabs. Adding a PE to the base prefab overrode all the art pieces: not good. The solution was to instantiate the prefab in the scene, add the PEs to the instantiated vehicle (which did not overwrite the art) and then apply the changes to the prefab. I mention the process here in case somebody else reading this process also needs to add PEs to a prefab.