# Changing angle of linetrace

**URL:** <https://forums.unrealengine.com/t/changing-angle-of-linetrace/463076>\
**Category:** Community & Industry Discussion\
**Tags:** Trace, direction, UE4-19, unreal-engine, UE4, question\
**Created:** [March 30, 2020, 4:09pm UTC](https://forums.unrealengine.com/t/changing-angle-of-linetrace/463076 "2020-03-30T16:09:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![OniricMaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OniricMaster](https://forums.unrealengine.com/u/OniricMaster)\
**Post date:** [March 30, 2020, 4:09pm UTC](https://forums.unrealengine.com/t/changing-angle-of-linetrace/463076/1 "2020-03-30T16:09:14Z")

</div>

Hello, so Im currently working on a basic zombie shooter game. Im trying to create a basic shotgun that creates 3 line traces, One Forward and then TWO to each side. Here an image to better visualize.

 ![298793-spawningmultipletracelines.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/9/649e1e362b588e2795d1b20524b411acf2d15443.png)

Ive manged to get the forward trace line to work but getting the ones to each side is harder since the player can rotate. Any ideas whats the correct way of achieving this?

---

<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:** [March 30, 2020, 5:44pm UTC](https://forums.unrealengine.com/t/changing-angle-of-linetrace/463076/2 "2020-03-30T17:44:18Z")

</div>

I believe that one of the easier methods would be to rotate the vector, this would give you an easily modifiable spread of the shotgun and can be expanded with additional traces if needed.

 ![298806-shotgun.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/b/3/5b3f9fd88c9731c68c37136eeae5e16e826c4817.png)

This rotates the vector by -45, 0 and then 45 degrees. Since we’re using forward vector as a base, it is automagically offset no matter the facing direction.

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/9/1/79157a691aee6b15d5c6b7bae12780dc8077f9de.gif)](https://gyazo.com/87c5152825fcccfecef4038434016c40)

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [March 31, 2020, 12:10am UTC](https://forums.unrealengine.com/t/changing-angle-of-linetrace/463076/3 "2020-03-31T00:10:23Z")

</div>

How would it be expanded with additional traces?

---

<div class="post-metadata">

**Author:** ![TheHairyDizz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheHairyDizz](https://forums.unrealengine.com/u/TheHairyDizz)\
**Post date:** [October 6, 2024, 2:04pm UTC](https://forums.unrealengine.com/t/changing-angle-of-linetrace/463076/4 "2024-10-06T14:04:22Z")

</div>

2024 checking in. Unreal 5.2.1, worked perfectly for wanting a “peripheral” that a simple entity actor will disappear from when crossed into one of three line traces. Cheers and hope all is well! Thanks again!
