I was wondering whether there is any way to make a light source damage an enemy (just like in Alan Wake), any response will be appreciated
If I were to implement something like that, I would probably just do a line trace from the light source in question to the enemy/enemies and see if it hits. If so, deal damage. If not, well, be nice.
could attach a trigger volume to the light source as a component then when a player enters the volume perform the damage to them. That way it’s a simple yes no check instead of a constant ray cast. Also can easily adjust the size of the trigger volume to match the light source a bit better. You could also expose the trigger boxes dimensions to your level editors so they could adjust them per instance of light.