function angleBetweenPoints(x,U)local E=x-U return-math.atan2(E.z,E.x)end function getCameraAngle(x)local U,E=x.CoordinateFrame,x.Focus return angleBetweenPoints(U.p,E.p)end


function angleBetweenPoints(p0, p1)
local p = p0 - p1
return -math.atan2(p.z, p.x)
end


function getCameraAngle(camera)
local cf, f = camera.CoordinateFrame, camera.Focus
return angleBetweenPoints(cf.p, f.p)
end
