Skip to content

WorldToScreen

Where a world point lands in the elements’ space.

WorldToScreen(x, y, z)
Parameter Type
x number metres
y number metres
z number metres

number, number - the point’s place, or nil when it is behind the camera

function OnFrame()
local sx, sy = WorldToScreen(1240, 2130, 41)
if sx then SetUiPos("flag", sx, sy - 40) ShowUiElement("flag") else HideUiElement("flag") end
end

GetScreenSize · OnFrame · the The game’s UI for a script group of the index