Script to control head by trackball