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

it’s 1st person