That counts for every plane : on head on passes, never go straight line, you are then way too predictable. Waggle your wings, use rudder, make everything to make the enemy think that you aren't even able to fly a head on pass straight. Of course when the right moment comes you need to aim well, as there is some deflection required.
This is very true, but the AI doesn't respond to those sorts of feints like a real human would.
The few places where you can just bore straight in with a head-on shot are when you're flying a much less maneuverable and/or better armed plane with comparatively heavier armament and your opponent's forward armament is nothing more than rifle caliber machine guns and/or a single low-velocity, slow-firing cannon.
Examples, P-47 (or just about any anything) vs. Ki-43. P-40C or P-36 vs. Ki-27 or A5M2. Bf-110 vs. Spitfire MkI or Hurricane MkI. IL2 vs. Bf-109E or F. Bf-109G vs. P-51.
Even then, you want to shoot from the extreme effective range of your guns and get out of there before your opponent gets within useful shooting range. For AI foes armed with .303/.30/7.6mm caliber guns, that's about 200-300 meters/yards. For 0.50/12.7mm guns it's 300-500 meters/yards. Human opponents are better at taking long-range shots.
This tactic works best if you have nose-mounted cannons, so you don't have to worry so much about gun convergence. It works even better if you have a fast-firing, high velocity cannon. Except for its fragile engine, the Bf-109G-10 or -14 is a wonderful plane for this sort of tactic because of its Mk108 cannon.
If you're flying a plane which is totally outclassed in terms of speed and maneuverability (e.g., Buffalo MkI vs. A6M2), the head-on shot is just about the only shot you're going to get, so you need to get good at taking them. You get at most one shot at the merge (when the opposing planes first get within shooting range). Then, if you're lucky, more shots if you can force your opponent to use boom and zoom tactics rather than just maneuvering.
The AI often likes to have planes which could easily win a maneuver fight just use B&Z tactics, so you you have lots of time to line up your shot as your opponent extends the range by a mile/2 km, then comes in with a diving attack. Turn into the attack, get your nose up so you're facing him, and trade shots if you can. Even if you can't get a shot, you can at least spoil his attack.
You're basically screwed anyhow, so there's no harm in losing a lot of airspeed by climbing to meet your opponent. Just make sure that you're as much of a head-on target as possible to minimize your profile with respect to your opponent and try not to stall.
If you're very lucky, since your opponent will have a lot of air speed and you'll be going really slow, if you survive the encounter you might be able to turn and follow your opponent. If they do the usual AI thing, they'll try to extend range using a long climbing curve. You can often turn inside that curve, either messing up their attack run, or maybe getting a high deflection shot at 70-90 degrees of deflection.
The really big deal is that an opponent can easily track your motion in one direction, but it's harder for him to track your motion in two directions. If you're going straight at your foe, you're basically negating one of your directions of motion with respect to your target. This means you need to actually be moving in three directions so that it appears that you're moving in two dimensions to your enemy. So, you dive and slip or turn across your opponent's line of travel.
You can also attack by climbing, slipping and turning, but that bleeds off airspeed which you probably need later, and speed also makes you a harder target to hit.
Even so, these tactics take a lot of work. Expect to die or turn into a fireball a lot until you get them figured out.