I use a combination of witcherscript and a custom made tool for code injection to change the projection matrices and the ingame camera.
The hardest part was to figure out which projection matrices to change and which not ;-)
For the headtracking itself I'm using either Opentrack and a IR head-tracking device for my desktop setup, or the Kinect v1 for my projector setup.
So currently there still are a lot of dependencies to other tools that I'd like to get rid of before releasing a first version.
For a nice explanatory video on the (old) technique itself, check out this: