Control paintball gun with Arduino/Similar Microcontroller
Project Sentry Gun looks to be what you want.

This project autonomously tracks, aims, and shoots at targets, using:


An airsoft or paintball gun 
A webcam to find targets  
A computer to process the video feed and aim the gun
Servo motors to aim the gun and squeeze the triger
Arduino to interface between the computer and the servos


Build instructions and the source code are posted on the website.