Changing angle of linetrace

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.

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?

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.

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

2 Likes

How would it be expanded with additional traces?

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!