How can I modify lighting system and apply it to other purpose?

What I wanna do is figure out the area where a player can’t see (like behind walls, objects),
and spawn some actors in this area.
I tried to implement it by line trace, but realized that it’s perfectly same as casting shadows in lighting system.
But I don’t know how can I use & modify that. Can anyone tell me how can I do that?