Third Person Firing (Line Trace)

Hey all,

I am trying to get some generic firing working for a third person camera. I feel like I’m super close. I got the line trace starting at the weapon’s “muzzle” socket and shooting out at a “weapon range” variable. However, the hit end location doesn’t quite line up with the cross hair (in the HUD, center of screen). Can anyone provide an assist here?

Thanks in advance!

Hey, i know this was posted a very long time ago now. but i was wondering if you ever got this fixed. I am now having the same problem with my Line tracing.

Thanks if you can reply

I havent touched this thing in a long time, but I’m pretty sure it was because I wasn’t deprojecting from the HUD to 3D space.

Blueprint above contains line trace with start point from weapon socket to scaled forward vector from it. That forward vector will not match crosshair projection because it is not depended on it. The end of trace from weapon must be determined by another trace from center of the screen. Additionally your setup depends on how you manage fact that camera can observe something that trace from weapon cant hit properly. For example when character is taking cover behind wall. That remind me an article from Gamasutra about TPS aiming
link text