Sensor for angular position

In another thread I saw this position sensor. There's apparently even a 2.5 mm version of it - maybe a suitable option for your project.