It would also probably be the ~opposite~ of doing;
/////////////////////////
getRealWorldYangle( xa, ya, za ) -- Euler in degrees, returns radians
////////////////////////
or...
////////////////////////
P.GetViewVector()
return rayX, rayY, rayZ
;;;;;;;;;;;;;;;;;;;
function P.ObjectPlayerLookingAt( dist, force )
local dist = dist or 2000
local force = force or 0
/////////////////////////
or...
the Function for turn to coordinates;
function RotateToPoint(e,x,z)
if g_Entity[e] ~= nil and x > 0 and z > 0 then
local destx = x - g_Entity[e]['x']
local destz = z - g_Entity[e]['z']
local angle = math.atan2(destx,destz)
angle = angle * (180.0 / math.pi)
if angle < 0 then
angle = 360 + angle
elseif angle > 360 then
angle = angle - 360
end
SetRotation(e,0,angle,0)
return angle
end
end
hmmm....? so how to transform that?!