Particles of Riddick

Assets Particles of Riddick

How do I trigger a muzzle flash? I have a scene with a gun being fired. I have gun shots sound files triggered using timeline. Triggering CUA seems to be a little difficult for me.
 
How do I trigger a muzzle flash? I have a scene with a gun being fired. I have gun shots sound files triggered using timeline. Triggering CUA seems to be a little difficult for me.
For sounds things are simpler since one just needs to trigger the AudioSource to play the sound with one command. For CUA as particle effects, you would need to turn the CUA on with a trigger and then off again with another trigger. To set this all up in a scene you might have the CUA atom turned off as the scene starts at time zero, and then the triggers in timeline would turn it on and off rapidly each time you want it to fire, so you would turn it on and activate the sound effect and then turn the CUA muzzle flash off quickly, like 0.5 or 1 second later. and then repeat that as needed for the animation.

If you set up a trigger in timeline, and select the muzzle CUA, look at the AtomControl setting for the muzzle CUA, there will be a check box to turn the atom on by selecting the check box as true. Then to turn it off later you insert the same option a fraction of time later in timeline and then uncheck the box which means false, that the atom is not on, so it will turn the CUA muzzle atom off.

If you inspect the latest update to Heroes and Villains, you will see a light saber demo scene. This doesn't use Timeline, but it uses animation patterns and in the animation triggers, one can basically set up the same sort of triggers. If you look at the triggers in the animation patterns for turning the light saber on or off, it will give you an idea on how to put the same trigger settings in timeline. That demo is sort of unique in that I needed to turn on and off two different CUA particles to achieve the effect, but the basic concept is the same.

If more tips are needed, please let me know, I would be glad to post a tutorial.

If you would want a specific muzzle effect to flash on and off at a set rate, I could look at providing that as well.

Below is an example from a project I am working on, to see what it looks like when I am adding an atomcontrol trigger, the one below will turn a laser on, and then I have another trigger a second later that turns the laser atom off, then repeat as needed.

1700940466197.png
 
Last edited:
I was able to get the results I wanted using the atom off/on method you mentioned. I had more difficulty lining the flash up to the barrel of the gun. I assume matching the xyz coordinates would have made it easier.
Thanks for the help
 
I was able to get the results I wanted using the atom off/on method you mentioned. I had more difficulty lining the flash up to the barrel of the gun. I assume matching the xyz coordinates would have made it easier.
Thanks for the help
Awesome, I am glad that you got it working. 😊
 
Would parenting the flash to the gun help him line the flash up?
I've never tried it but that would be worth a try.
Unless I have the wrong understanding about the setup, I had to line it up before parenting. Otherwise the flash would have been sync with the motion of the gun only and not in the position of the barrel.
 
Unless I have the wrong understanding about the setup, I had to line it up before parenting. Otherwise the flash would have been sync with the motion of the gun only and not in the position of the barrel.
Also if the hand moves durring the firing of the flash, the flash would move with the hand movement so might not be the best
 
Back
Top Bottom