So you would like to teach a robot to aim a gun at you and follow your movement? The Realtime Gun Aiming project shows you how to do just that. It shows you how to keep a toy gun aiming at you as you move. You will need two servo motors, Arduino UNO, motor driver board, web camera, and machine programming to complete this project.
You can find more info about this project on Instructables.