Neil.
The basic idea is the heel-toe orientation of the club at impact. Which, yes, too flat means heel raised toe down will cause the ball to go right. And toe up heel down will cause the ball to go left(too upright).
However that is just one part…