I want to add a muzzle flash to my firing submachinegun, it shoots at about 12 rounds per second as a real-life SMG would. Now, at this rate, most of the time the flash isn’t created/shown, only if the timescale is lowered to slow-motion will every shot show a muzzle flash. It doesn’t matter how I create the muzzleflash, I have tried the following methods and they were all unreliable:
- Instatiating a particle system prefab at game start, disabling the emitter, and only enabling it for a short period (0.1 seconds) every shot
- Instantiating a particle system prefab for every shot, and destroying it again after 0.1 seconds.
Is there any way to make muzzle flashes for rapid-fire weapons more reliable?
I use a 2d texture on a plane in front of my guns, and it just renders when I am shooting, did you try this? edit: I also made a spinning animation so it doesn't have the "same" flash every time, the flash is rotated with a particle/additive shader
– Commander_QuackersI'm thinking about doing it with a plane, but what counts is wether it works reliably with a high rate of fire.
– Cherno