Skip to content

World Coordinate System

Gustas edited this page Oct 4, 2022 · 11 revisions

Coordinates System

OpenRA is a 2.5D engine. Although 3D is supported and widely used, much of the logic treats the game as being 2D. Moving along the X and Y axes is referred to as horizontal movement. Upwards direction is defined via Z axis. Movement across this axis is referred to as vertical movement.

World

World coordinates are independent from screen coordinates, allowing the player to scroll and zoom the playfield. They represent actors, special effects and anything not related to the GUI. Each cell has 1024 measurable units within it. They are specified behind the c in yaml. For example 1c0 is the same as 0c1024 and 5c512 means 5.5 cells.

WPos(X, Y, Z)

Location in the game world.

WRange(Range)

Distance from a WPos origin.

WVec(X, Y, Z)

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. The Map class contains methods that can use cell information such as CenterOfCell () which returns world coordinates.

CPos(X, Y)

Location on a grid.

CVec(X, Y)

Offset from a CPos origin.

Map (Isometric)

Can be converted to and from CPos.

MPos (U, V)

Location on a map.


Images

Courtesy of Phrohdoh, FRenzy

Various

Various demonstrated

MPos

MPos demonstrated

Players ๐ŸŽฒ

Modders โœ๏ธ

Developers ๐Ÿ”ง

Clone this wiki locally