Coordinate System Documentation

Last Updated: December 11, 2002

Translation

World coordinates in Medal of Honor: Allied Assault is arranged such that the plane formed by the X & Y axis is horizontal, with the Z axis pointing up from there. In the editor, this is represented with positive Y being up, and positive X to the right.

Example 1:

World coordinate axis

Rotation

Rotation in Medal of Honor: Allied Assault uses a separate set of axis than the map coordinates use. Rotational vectors stored (X, Y, Z) represent (Pitch, Yaw, Roll).

You can think of the matrices returned by the game functions as returning 3 vectors: Forward, Left, and Up. Positive X rotation results in Forward to pitch downwards. Positive Y rotation results in Forward and Left to rotate counter-clockwise around Up. Positive Z rotation results in Left and Up to roll to the right around Forward. An angle of (0, 0, 0) looks positively along the X-axis, with the Y-axis going positively to the left, and the Z-axis going positively up.

Game functions that change angles to a matrix or axis (AnglesToMat, AnglesToAxis) return a left-handed coordinate system. In world coordinates, (0,0,0) would produce:

X 	| 1  0  0 |
Y 	| 0 -1  0 |
Z 	| 0  0  1 |

Game functions that change angles to vectors (AngleVectors, Vector::AngleVectors) return a left-handed coordinate system, but as 3 directional vectors. This is convenient for dealing with relative motion to an object. (0, 0, 0) would produce:

forward 	[ 1  0  0 ]
right		[ 0  1  0 ]
up      	[ 0  0  1 ]
Example 2:

Object rotation axis