# Line trace collision detection for laser gun, how to detect when an object is getting hit by the the line trace

**URL:** <https://forums.unrealengine.com/t/line-trace-collision-detection-for-laser-gun-how-to-detect-when-an-object-is-getting-hit-by-the-the-line-trace/457126>\
**Category:** Blueprint\
**Tags:** line-trace, hit-detection, collision-detection, unreal-engine, UE4, Blueprint, question\
**Created:** [October 18, 2019, 11:43pm UTC](https://forums.unrealengine.com/t/line-trace-collision-detection-for-laser-gun-how-to-detect-when-an-object-is-getting-hit-by-the-the-line-trace/457126 "2019-10-18T23:43:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikebawdon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mikebawdon](https://forums.unrealengine.com/u/mikebawdon)\
**Post date:** [October 18, 2019, 11:43pm UTC](https://forums.unrealengine.com/t/line-trace-collision-detection-for-laser-gun-how-to-detect-when-an-object-is-getting-hit-by-the-the-line-trace/457126/1 "2019-10-18T23:43:22Z")

</div>

hi, I have converted the first person blueprint gun into a laser gun and i would like to add impulse physics to any object being hit by the laser similar to the base prefab, I am new to visual scripting and am unsure how to approach adding a hit detection to an object if hit by the laser. I would like to eventually make it so if a specific object is hit by the laser/line trace it will, for example, begin to rotate.

 ![290427-desktop-screenshot-20191013-23580946.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/a/e1ad2416fb0ce06f274be05d1b07338ea5512561.jpeg)

 ![290428-u1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/e/a/aea0bae64c7acd389862c404107b3f89f34059dc.png)

 ![290429-u2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/2/a8220e0147ca7feca80d4710605ff909d00adf9b.png)

---

<div class="post-metadata">

**Author:** ![chrudimer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chrudimer/32/918651_2.png) [@chrudimer](https://forums.unrealengine.com/u/chrudimer)\
**Post date:** [October 19, 2019, 4:09pm UTC](https://forums.unrealengine.com/t/line-trace-collision-detection-for-laser-gun-how-to-detect-when-an-object-is-getting-hit-by-the-the-line-trace/457126/2 "2019-10-19T16:09:27Z")

</div>

Hi, in your “Break Hit Result” the “Hit Actor” will be the object you’ve hit with your linetrace, the “Hit Component” will be the component you’ve hit. If you want to add an impuls to the component you’ve hit it must have “physics” enabled.

 ![290494-add-impuls-laser.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/3/873ed19e23224cdfb5ed5d9ddffde5be892404ba.png)

So you could check if the component has physics enabled and then add a force or an impuls at the hit location.
