Weapon Accuracy

Hey all! So I’ve been looking around but I havent found anything on the following. I have a ThirdPerson/FirstPerson project with a character holding a weapon and a basic HUD displaying a dot for aiming. I finished with aim offest and now I want to fine tune the weapons accuracy in relation to the aiming dot (and mouse in extense).
In both occasions (TPS/FPS) the weapon’s axis is not perfectly aligned with the camera. There’s also the idle animation causing the weapon to aim all over the place. Right now I’m trying to somehow implement Line Trace and come up with a triangulation mechanism. With this mechanism I want to do the following:

  1. Get the Camera Manager’s start and end trace
  2. Create the weapons direction using (probably) the character’s socket location as a starting point and the Camera Manager’s end trace.

I hope I make a clear point. Is there any way already described somewhere? Can anyone guide me through making such a thing? Any suggestions?
Thanks in advance!

Sorry for the delayed addition. The aiming system has been created.
What I did was:

  1. I took a first line trace, starting from the center of my camera (manager) and ends at the first colliding object it detects.
  2. I then took a second line trace from the shooting direction i get, from the weapon’s arrow component.
  3. In the second line trace, I replaced the end point with that from the camera at step 1.

After doing the steps above, I could easily add bullet spread by putting a randomization node before pinning the result at the second line trace’s end point.