Hello. My name is Jane & I can't sew a straight line! Sounds like we are all admitting to a problem that requires a 12 step program.
Anyway, I have two tips. If you are veering off at the end of a seam, you can try using a stiletto to guide the last little bit of fabric under the needle. I use the tip of my seam ripper. Oh, and I can still veer off the quarter inch even then!
The other tip is too not look at the fabric going under your needle as you sew. Look in front of the needle. Hope that makes sense.