Skip to content

World Coordinate System

yesfish edited this page Jan 8, 2015 · 11 revisions

World

World coordinates are independent from screen coordinates.

World coordinates don't begin at a set origin so use Map.Bounds if there is no reference point.

WPos ( X, Y )

Location in the game world.

WRange ( Range )

Distance from a WPos origin.

WVec ( X, Y )

Offset from a WPos origin.

WRot ( Roll, Pitch, Yaw )

Three axis rotation with 1024 steps per axis.

WAngle

Single axis rotation with 1024 steps.

Cell

Cell types are used to represent building footprints, unit paths, overlays and terrain information. Cells will typically contain one unit (or five infantry), although this isn't always the case.

CPos ( X, Y )

Location on a grid.

To convert a CPos to WPos, multiply by 1024, then offset by 512.

CPos ( 0, 0 ) = WPos ( 512, 512 )

CPos ( 1, 2 ) = WPos ( 1536, 2560 )

CVec ( X, Y )

Offset from a CPos origin.

Players ๐ŸŽฒ

Modders โœ๏ธ

Developers ๐Ÿ”ง

Clone this wiki locally