I am planning on implementing a sanity stat on my player that I would like to be affected by the luminosity of the room the player is in. So for example, the player enters a dark room without a working torch, it would start losing sanity.
I could give properties to certain volumes on my level that could indicate the state of that room, but first I would like to know if anyone knows of more systemic ways of achieving similar results, by measuring how much light is reaching a certain actor.
Thank you.