Is there a way to get the brightness of a specific world location?
We are making a stealth game and need this for detection of our NPCs and player feedback on the HUD.
I have looked into it and there are multiple ways to detect if a player is visible, however those I have found aren’t optimal or not really efficient:
1- Creating a child blueprint of the light and using a sphere arount the light for collision detection
(found here)
I would guess that this doesn’t work, since a player can be positioned inside the sphere of the light source and still not be visible if there is an object or a wall between the player and the light source - however the spherecollision would mark the player as visible even though he is not.
2- Using line traces from player extremities to all light sources with the player inside the attenuation radius. Every single tick.
This seems to be way too performance heavy.
So I’m looking for a way to do this which isn’t too performance heavy - If there was a way to get the light levels of a certain world location it would make things a lot easier, but I haven’t found out how to do that yet.