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) - GetRawNoShort excerpt from the shipping addon HarvestMap — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.
Most-downloaded addons using it
| Addon | Total downloads |
|---|---|
| HarvestMap | 9,454,533 |
| Code's Combat Alerts | 4,445,158 |
| LibGPS | 4,027,526 |
| HodorReflexes - DPS & ULT tracker | 3,446,840 |
| LibMapData | 2,291,531 |
| LibZone | 1,937,031 |