- Home /
Make light attached to particle system flash?
I am having in issue with a muzzle flash particle system. I have attached a light to the particle system, but it is always on. I thought I would have to disable it in the scene, but now it is always off. I tried making it into an asset: Dragged both components (PS as the parent, light as the child, AND no parent/child setup) into one of my Asset folders, then deleted the actual component from the scene view, dragged the newly made asset into the particle system spot on the script. It did not shoot, not even the particle system. How would I make this work so that whenever I pressed the left mouse button, the PS would play, and the light would flash? (I am following a Brackeys "Shooting with Raycasts" tutorial).
Enable the “Lights” module of your muzzle flash particle system and attach your light game object to this module. Then disable the game object with light.
https://docs.unity3d.com/$$anonymous$$anual/PartSysLights$$anonymous$$odule.html
Answer by JonPQ · Oct 11, 2018 at 10:19 PM
it should work just fine if the light is on a gameobject that gets turned on for a while. (say the muzzle flash effect or the end of the gun. Pause it when you shoot... check the scene view. Is the object, on ? is the light component on ? check the cone... is it big enough to reach your geometry and light it ? is the intensity bright enough? are its layers set to light the geometry in your scene... check the geometry layers match. check you don't have too many real time lights (the shaders may ignore too many) Stick with one directional (sun) and one spot or point, for muzzle flash effect. Bake the rest of your scene lights. Check your quality settings for how many real time lights are enabled, and that you are not rendering in 'Simple' vertex lighting mode.
Your answer
Follow this Question
Related Questions
Particle System lights not visible when looking away 0 Answers
Particles that only show in light 2 Answers
How to bake a point light? 1 Answer
Light slightly goes through walls 1 Answer
Point Lights look strange 1 Answer