Download

Dectect Pawns Light level?

Is it possible to get the amount of light hitting a pawn?

I imagine it’s certainly possible. I still have much to learn but if I were to try something of the sort, I’d be peering into the source code - particularly lights - to better understand what properties actually cause actors to be illuminated via a source. Once you’ve got that much figured out, it’s only a matter of tapping into it and finding the highest/average illuminated surface on the player (may or may not be expensive, depending on how you do it and model detail).

…Alternatively, depending on how your game is intended to function you could simply create a class to include a light and volume, fetch the distance and check if the player is within or near the area to determine how much light the character is estimated to be exposed to, though this wouldn’t account for lightmass unless you setup a volume to cover those areas as well. Again, this all depends on the game type and what your intentions are.