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.

e1c606a499ea60578793f2c36e784d5118e3f320.jpeg

2a142f8708a0acceb180446cc8b09be7ba901f36.jpeg

e1f3178a9b83cbea1f19055907cd75e73b55d1db.jpeg

Hello,
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,

thanks.

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?