Short range Left/Middle/Right. IR?

Yes that sort of sensor is good for a few mm. However it is susceptible to interference by ambient light especially sunlight