Make Rotator from stick for side scroll shoot

Maybe somebody can give a principial scheme for solve this problem?