Skip to content

World Position ​

 

Position ​

World position axes

Each map (instance, transport, continent) has its own cartesian coordinate system. To place a new entity it is easiest to position yourself where it should be spawned and use the .gps command.

This position information is expressed through the following fields per database table. Some fields may be omitted. (e.g. z and o are omitted for Quest PoI as they are shapes on a 2D map)  

FieldDescriptionComment
x  Vertical AxisS <= 0 <= N
y  Horizontal AxisE <= 0 <= W
zHeightbelow x/y plane <= 0 <= above x/y plane
o  Orientation0 <= o <= 2π
mMap ID the coordinates refer tomay be implied / optional

 

Orientation ​

Orientation is stored as radian, increasing counterclockwise around the z-axis.

PositionRadianDecimal
North0 / 2π6.28319
West0.5π1.57080
Southπ3.14159
East1.5π4.71239

 

Zone Coordinates ​

World Position should not be confused with zone coordinates used by client addons or Aowow (0 – 100). Zone coordinates are calculated from WorldMapArea.dbc data and largely irrelevant from a server point of view.  

WorldMapArea.dbc - describes the WorldPos boundaries of each area map viewed in-game.

WorldMapArea.dbc
+-----+-------+--------+------------------+---------+----------+----------+-----------+
| ID  | MapID | AreaID | AreaName         | LocLeft | LocRight | LocTop   | LocBottom |
+-----+-------+--------+------------------+---------+----------+----------+-----------+
|  27 |     0 |      1 | DunMorogh        | 1802.08 | -3122.92 | -3877.08 |  -7160.42 |
+-----+-------+--------+------------------+---------+----------+----------+-----------+

world.creature
+------+------+-------------+-----+------------+------------+
| guid | id   | name        | map | position_x | position_y |
+------+------+-------------+-----+------------+------------+
|  206 | 1226 | Maxan Anvol |   0 |   -5590.56 |   -529.657 |
+------+------+-------------+-----+------------+------------+
areaX = ((position_y - left) / (right - left)) * 100
areaY = ((position_x - top)  / (bottom - top)) * 100

areaX = 47.3 = ((-5590.56 - 1802.08) / (-3122.92 - 1802.08)) * 100
areaY = 52.2 = ((-529.657 + 3877.08) / (-7160.42 + 3877.08)) * 100