# Flashlight

**URL:** <https://forums.unrealengine.com/t/flashlight/2344713>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, flashlight, question\
**Created:** [February 19, 2025, 11:35am UTC](https://forums.unrealengine.com/t/flashlight/2344713 "2025-02-19T11:35:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![14BOBR14](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@14BOBR14](https://forums.unrealengine.com/u/14BOBR14)\
**Post date:** [February 19, 2025, 11:35am UTC](https://forums.unrealengine.com/t/flashlight/2344713/1 "2025-02-19T11:35:27Z")

</div>

I know how to create a regular flashlight But how to make realistic flashlight?  
On the Internet and on the forum I did not find examples of such a flashlight as in this video

[https://www.youtube.com/watch?v=o\_2z-zsVsEk](https://www.youtube.com/watch?v=o_2z-zsVsEk) at 28 min

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 19, 2025, 11:43am UTC](https://forums.unrealengine.com/t/flashlight/2344713/2 "2025-02-19T11:43:10Z")

</div>

> [@14BOBR14](#):
>
> On the Internet and on the forum I did not find examples of such a flashlight as in this video

I believe it’s a matter of digging long enough, almost everything has been done by now, is this any closer to what you’re after:

> [@How to make realistic Flashlight Beam?](https://forums.unrealengine.com/t/how-to-make-realistic-flashlight-beam/1290810/2):
>
> Depends on the level of realism you’re after: what’s above seems like a basic light function material: [[Make a Realistic Flashlight in UE4/5] ](https://www.youtube.com/watch?v=lTxKsGtaFhY) If that’s not good enough, do elaborate what the expectations are.

---

<div class="post-metadata">

**Author:** ![14BOBR14](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@14BOBR14](https://forums.unrealengine.com/u/14BOBR14)\
**Post date:** [February 19, 2025, 11:56am UTC](https://forums.unrealengine.com/t/flashlight/2344713/3 "2025-02-19T11:56:36Z")

</div>

I saw this video, I have the same one now. But it seems to me in the video what i sent that another flashlight . It is not tied to a specific point and is more floating

---

<div class="post-metadata">

**Author:** ![14BOBR14](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@14BOBR14](https://forums.unrealengine.com/u/14BOBR14)\
**Post date:** [February 19, 2025, 11:59am UTC](https://forums.unrealengine.com/t/flashlight/2344713/4 "2025-02-19T11:59:49Z")

</div>

like the 2D camera has a “camera window” and this flashlight has about the same

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 19, 2025, 12:02pm UTC](https://forums.unrealengine.com/t/flashlight/2344713/5 "2025-02-19T12:02:28Z")

</div>

> [@14BOBR14](#):
>
> It is not tied to a specific point and is more floating

It’s a matter of adding some sort of spring interpolation. Are you using a first person point of view for this? There’s probably as many ways of making it _floaty_ as there are people.

* * *

Have a look at this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/1/6a1b31d9c67e1c12072cb3a3e1a72caf1362a6b2.jpeg)

It’s a flashlight on a springarm:

While I can’t come up with anything simpler than this, we can definitely make it more complex if needed. Perhaps it’s a good starting point?

The next step would be to incorporate an additional offset based on player movement / turning direction. Break it down into a list of desired features / behaviours and start working on them one by one.

---

<div class="post-metadata">

**Author:** ![14BOBR14](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@14BOBR14](https://forums.unrealengine.com/u/14BOBR14)\
**Post date:** [February 19, 2025, 3:05pm UTC](https://forums.unrealengine.com/t/flashlight/2344713/6 "2025-02-19T15:05:12Z")

</div>

I already know that. What I mean is that the light is fixed at a certain point. And I wanted to make a box like in the 2D “camera window”, if  
the player goes out of bounds, then the camera follows him. Exactly the same thing, only instead of the player there will be a flashlight. If the flashlight goes beyond certain limits, then only the camera will follow the flashlight

the flashlight always follows the point

  
.  
.  
I ask how create box? if the flashlight goes out of Box, only then the camera will follow the flashlight  
 ![Screenshot_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/2/252e31fdb0c467af4f47d21ab4ff08406b2397a8.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 19, 2025, 3:13pm UTC](https://forums.unrealengine.com/t/flashlight/2344713/7 "2025-02-19T15:13:33Z")

</div>

`Dot Product` the camera’s `forward` and the flashlight’s `forward` vectors, you’ll get a value in -1 \<=\> 1 range. The closer you are to 1.0, the closer you are to the centre. Instead of a box, you’ll get **a much more accurate cone**. Start `Lerp`ing the flashlight’s direction only once the dot product value exceeds a set threshold. You will need to set up some flow control to arrive at the centre once the interpolation starts.

* * *

> I already know that.

Consider starting threads with more details, you’ll get the desired answer quicker.

---

<div class="post-metadata">

**Author:** ![14BOBR14](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@14BOBR14](https://forums.unrealengine.com/u/14BOBR14)\
**Post date:** [February 20, 2025, 5:33pm UTC](https://forums.unrealengine.com/t/flashlight/2344713/8 "2025-02-20T17:33:25Z")

</div>

Can you explain this to me?  
I don’t understand how I control the arrow?  
and why it doesn’t move up and down

---

<div class="post-metadata">

**Author:** ![14BOBR14](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@14BOBR14](https://forums.unrealengine.com/u/14BOBR14)\
**Post date:** [February 20, 2025, 5:33pm UTC](https://forums.unrealengine.com/t/flashlight/2344713/9 "2025-02-20T17:33:58Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [March 22, 2025, 5:34pm UTC](https://forums.unrealengine.com/t/flashlight/2344713/10 "2025-03-22T17:34:50Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
