YouTuber and Penn State University student kss5095's final project for Advanced Mechatronics (coolest class ever?) is a working Portal turret that uses a webcam to track targets and hit them with Nerf darts.
The turret was programmed using MATLAB and Arduino, and kss5095 says he plans to build an exterior shell that will make it look more like the in-game turrets.
Bonus points for the laser sight and a pretty good array of turret voice clips. I hope his professor is making a note here: huge success.