How do I detect if the player is looking at an object?

Is it 3rd person or 1st person?