Third Person Weapons - Correct Aiming

There isn’t anything wrong with how you’re currently handling this. The issue simply is that the ray you’re casting is intersecting with the wall before it can travel far enough to reach the crosshair. You can confirm this by firing your weapon in such a way that it doesn’t intersect with any geometry or meshes.

To fix this discrepancy you’d have to use an alternate crosshair setup that dynamically accounts for collisions like this.