I have a Viper as well and as others have said, if you have beams on the medium hardpoints they only fire when the target is below the center of the screen, but if gimbled, will still fire when the target is below you and blocked from view by your cockpit. Try pitching your nose up slightly when you fire, then get the up/down left/right strafing thrusters more involved in maneuvers.
As for why on Viper and not Cobra. On the Viper the bottom medium mounts are half-way back the ship almost to the rear landing gear. It can't shoot centered directly ahead unless the target is quite far away without blasting the nose of your own ship, and never above center. It does have a fairly large firing arc below the ship where you can't see, so until the targeting dots come back up to the center of the screen feel free to keep firing at unseen targets (just hope an unseen friendly doesn't happen into the beam). On the Cobra the medium hardpoints are on the top nose area so aren't blocked by the hull much, and even the small wing hardpoints aren't set back near as much as the mediums on the Viper. Viper wins in the looks department though.