Rotate two separate guns to mouse location

I am trying to do two things, one if there is no vertical target (mech, building or whatever) then the guns both shoot the ground at the mouse location. Two, if there is a vertical target then the guns shoot at the vertical target at the mouse location. The mech’s torso rotates to the mouse location and is clamped to only rotate so far left and right. The arms can rotate so the guns can shoot up and down to a set height. The lower arms can rotate inwards to hit close targets.

I want to rotate the two separate mech arms to converge on the mouse’s location (Mouse’s location is blue square). When aiming up high and down to about mech height it works correctly. Once you get closer it doesn’t converge anymore. Below mech height and/or close range it doesn’t converge at the mouse location.

I am at a loss on what the issue could be or if I am even going about it correctly.

There is a line trace for each gun