Remove duplicated code for converting angles to camera transform