# how to make a flashlight that only turns on in dark places without box collision and trigger 

**URL:** <https://forums.unrealengine.com/t/how-to-make-a-flashlight-that-only-turns-on-in-dark-places-without-box-collision-and-trigger/2137740>\
**Category:** Getting Started & Setup\
**Tags:** unreal-engine, question\
**Created:** [November 20, 2024, 2:31pm UTC](https://forums.unrealengine.com/t/how-to-make-a-flashlight-that-only-turns-on-in-dark-places-without-box-collision-and-trigger/2137740 "2024-11-20T14:31:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuraviper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yuraviper](https://forums.unrealengine.com/u/Yuraviper)\
**Post date:** [November 20, 2024, 2:31pm UTC](https://forums.unrealengine.com/t/how-to-make-a-flashlight-that-only-turns-on-in-dark-places-without-box-collision-and-trigger/2137740/1 "2024-11-20T14:31:14Z")

</div>

Show me please blueprint or something maybe some video or something else

---

<div class="post-metadata">

**Author:** ![Nightwolf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nightwolf/32/917179_2.png) [@Nightwolf](https://forums.unrealengine.com/u/Nightwolf)\
**Post date:** [November 20, 2024, 3:07pm UTC](https://forums.unrealengine.com/t/how-to-make-a-flashlight-that-only-turns-on-in-dark-places-without-box-collision-and-trigger/2137740/2 "2024-11-20T15:07:27Z")

</div>

I would do a sphere trace for objects, break the hit result, if its a light and nothing is in the way

 ![Screenshot 2024-11-20 091422](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/7/a8730d0934799016839605d42329061afc48a1a1.png)  
something like this

Actually after thinking about it for a second it’s probably better to just do a line trace towards the nearest light source after finding out what that is with a sphere trace

 ![Screenshot 2024-11-20 092159](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/8/1e81937d27e6005f29bc202320d53e727d87c3a8.png)  
 ![Screenshot 2024-11-20 092223](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/b/5/3b596294f2179010dc41aac94fe7383bdb003fdb.png)  
 ![Screenshot 2024-11-20 092239](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/1/8/41841687081d0be529ddac1bc32eb76281888860.png)
