yes getWorldFromScreenPosition just above player head, and processLineOfSight should do, fill the params with player for start coords and a bit of offset (like 1 or 2 meters) to evade the ray hitting the player itself, and getWorldFromScreenPosition for end coord, you can customize others params to your needs.
something like:
local wordx,worldy,worldz=getWorldFromScreenPosition(...
local hitornot,hitx,hity,hitz=processLineOfSight(playerx,playery,playerz,worldx,worldy,worldz)