Thread: Location app?
View Single Post
03/01/14, 05:49 AM   #7
jgm
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 7
Originally Posted by Wykkyd View Post
local unitTag = "player"
local zoneName = GetUnitZone( unitTag )
local x, y, z = GetMapPlayerPosition( unitTag )

The values of x, y and z are relative to the zone map. And they are very "small" values. IE:

x might come back as 0.23788127281

x = west-east
y = north-south
z = altitude

A perfect 0,0,0 (for x,y,z) would be considered Base or Root position for that map.

x - Increasing value is moving west from 0. Decreasing is moving east.
y - Increasing value is moving north, decreasing is moving south.
z - Increasing value is descending altitude (distance below "sea level", if you will)

EDIT: I know, not an addon. But it's code to help someone else build one
Just FYI, it's not z but a, the heading.
  Reply With Quote