ESODecoded

GetUnitWorldPosition

ESO Lua API function — used by 123 of the 3,030 addons we indexed (combined 29,889,280 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

GetUnitWorldPosition(string unitTag)

Returns: integer zoneId, integer worldX, integer worldY, integer worldZ

Real usage — from HarvestMap

		local r1 = GetNormalizedWorldPosition(zoneid, x+1000, y, z) - GetNormalizedWorldPosition(zoneid, x, y, z)
		local zoneid, x, y, z = GetUnitWorldPosition("player")
		local r2 = GetRawNormalizedWorldPosition(zoneid, x+1000, y, z) - GetRawNo

Short excerpt from the shipping addon HarvestMapits ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.

Most-downloaded addons using it

AddonTotal downloads
HarvestMap9,454,533
Code's Combat Alerts4,445,158
LibGPS4,027,526
HodorReflexes - DPS & ULT tracker3,446,840
LibMapData2,291,531
LibZone1,937,031