Simply blueprint detecting if player is in light

**Hello all.

Sorry for my bad English and very big pictures.**

I try create small Horror game and i want added simply light stealh system. I try search but not finding any tutorials about this.
And i create this compact detecting in line trace system.
It check if player stand in light and nothing prevents the light, it check player head and feet.

You need 2 variables:

1: Boolean type - PlayerInRange
2: Float type - DetectionRange

In DetectionRange you put your Light Attenuation radius value.

I hope it’s help somebody :smiley:

Please, write me if you know how create this better or another post or video about this.

Thanx for read my post.

And again sorry for my verybad English.

Good Luck :slight_smile:

Some images how it works.




A big big thank you for this gift ! ^^

You’re welcome :slight_smile: But it’s works now only in point light. Now i try create this in Spot light.

This can be adapted for a few different things,

1 idea is a game involving Vampires, where the player or AI can get a burning tick damage when entering sunlight.

Awesome gift,


Just forgot about one thing, i’ts blueprint works if you crouch but need change feet vector-vector z value less than 75, because feet line trace if you start crouch begin touch floor and say as though player in shadow.

You can added this anywere :slight_smile:

Hello all.

Here small updated in this system.

If you use glass or another material through which the light passes.

If you placed it system think you in the shadow.

You need changed collision of this mesh.
Change to Custom and in Trace Responses - Visibility set in Ignore.

And now all works fine :smiley:

And again sorry for my bad Engilsh.

Good luck :slight_smile:

This was incredibly helpful thank you so much! I figured out that you can make the sensor directional by building a physical barrier into the asset to block the sensor, and not allowing the line trace to ignore itself.

Did you ever figure out a good way to do the spot light?