Measuring the angle to an object using IR sensors?
Distance sensors actually measure the angle, then calculate the distance using triangulation, which provides a relationship between angle and distance:


Obviously, you can progressively rotate this assembly to known angles and stop when you measure the expected distance. Then you know you're facing your object.

An alternative approach would be to install the light source on the object in question. Then you would measure the angle to it directly without the need to rotate anything, and you don't need to know the distance to your object beforehand.