The ZX Sensor uses infrared light to determine the distance from an object and where the object is located on the X axis (between IR LEDs), available from SparkFun Electronics. The <a href="https://www.sparkfun.com/products/12780">ZX Distance and Gesture Sensor</a> is sensor capable of sensing an object's distance from the sensor and its location between the IR LEDs.