How can I get the location the player is looking?

What sort of player? ( first or third person )