If we find a way to get the distance of w/e the player is looking at client-side (Don't think so) then the maths will exist. Can probably be made into a server/client thing though.
it is completely impossible to determine the camera's position in third person
What? How?
I agree. How? Isn't the position of the third person camera just an offset property of the current playertype? If so, that'd be really easy; just access <datablock>.cameraOffset or something (I don't know the exact property).
Well no, but you have the first person camera position and all of the properties used for offsetting it.Take ::getEyeTransform()Add cameraHorizontalOffset and cameraVerticalOffset (IIRC)Rotate upward by cameraTiltSend a raycast from current position in the opposite facing direction, cameraMaxDist units awayIf it hits something, set the position to the hit position clamped to cameraMinDistOtherwise, set the position to the end point of the raycast