No offense intended, but my guess is you probably flinched, turning your head at the pitch that was coming towards your face, and that's how you got drilled.
Overcoming flinching takes practice and discipline. I've found it also helps, if a pitch is coming right at my face, to close my eyes right before contact. The only downside to this is then I have to go to my partner to ask if the batter swung.