The best way is with a fitter, measuring the knee angles. Adjusting fore/aft will affect the knee angles slightly, and heel in/out will affect the knee tracking. Then there's Q spacing. Don't forget custom insoles/wedge inserts for pronation, etc... too. There's kind of a lot to this.
I paid $$$ for a good fit, and now almost all of my problems are gone just a few weeks later.
Surprisingly, what felt good at the foot (more heel in towards the chain stays), was not what was best for my knees.