Linetrace from weapon to crosshair (mid screen)

hey there!

I just stuck with a linetrace setup.
The result is the same with “LinetraceByChannel” blueprint!
So I want a shooting linetrace from the weapon muzzle to the crosshair all the time.
I found a solution but its not always hits the object/character.

Do you have a solution or another way to setup it?

thanks a lot

You’re doing a sphere trace with a radius of 0, you might as well be doing a linetrace.

My guess is that sometimes your trace is just barely missing the object by 0.0000x. Either increase the radius of your sphere trace, or lengthen the vector that you’re tracing on.

To lengthen the vector, you can do, RealEnd = End + (End - Start) which will double the trace distance.

hey you mean like this right?
It seems it hits every time now!
thanky

Yep, exactly, that’ll double the distance your trace travels, which will put it the (probably) 1 unit further it needed to go :slight_smile:

Glad it’s working for you!

Thank you! This helped me out as well. I was banging my head against a wall for a few days. My only remaining bug is that my traces are deflecting from my crosshairs. The farther I turn left, the more my hits veer to the left. The same thing goes for up, down, and right. Any suggestions?

I dont really understand your issue Drifty86 ? :confused:
some pic or video about it?