WoW API: GetCurrentPosition

From AddOn Studio
Jump to navigation Jump to search

WoW API < GetCurrentPosition

Returns the position of a unit relative to the world.

local loc = GetCurrentPosition("unit")

Parameters[edit]

Returns[edit]

  • locY (number) - Y value of the player's position.
  • locX (number) - X value of the player's position.
  • locZ (number) - Z value of the player's position (0 is sea level).

Example[edit]

local locX, locY, locZ = GetCurrentPosition("player");
DEFAULT_CHAT_FRAME:AddMessage(locX .. ", " .. locY .. ", " .. locZ);
Result

1773.85, 63.06, -46.32

Notes[edit]