Hacker House shared this in depth tutorial on Youtube!
In this video we show you how to build a motion tracking airsoft (or nerf gun) turret with a raspberry pi 3. The airsoft turret is autonomous so it moves and fires the gun when it detects motion. There is also an interactive mode so that you can control it manually from your keyboard. This project is small, lightweight and entirely battery operated.
Since this device fires projectiles, please use the necessary safety precautions while operating the turret.