If you want to see if some thing is in front of a sensor with no contact(limit switch replacement), These worked well for us this year to detect where the balls were in our bot.
http://www.pololu.com/catalog/product/1134
A couple of things to know about their use. Direct natural sun light and some florescent lighting can cause problems. Best used in the robot with some light shielding. We had problems with the digital side car 5 volt power supply. We added 100uf to the side car bus and 22uf at the sensor. The motion of the object should be perpendicular to the sensor. Once we addressed these issues, they worked very well for our ball racking system. The other Sharp analog distance sensors also have worked well for us with the power fix. Not for the shooter velocity. There are several threads on the velocity and encoders.