My cut of the headtracker code from Pocketmoon