mohaa-spearhead-sdk/docs/Coordinate_system_documentation.html

74 lines
2.1 KiB
HTML
Raw Normal View History

2003-02-06 00:00:00 +00:00
<html>
<head>
<title>MOHAA - SDK</title>
</head>
<body>
<b><u><font size=+2>Coordinate System Documentation</font></u></b>
<br>
<p>
Last Updated: December 11, 2002
</p>
<b>Translation</b>
<br>
<p>
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.
</p>
<b>Example 1:</b>
<p>
World coordinate axis
<br>
<img src="Coordinate_system_documentation/1-1.jpg">
</p>
<b>Rotation</b>
<br>
<p>
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).<br>
<br>
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.<br>
<br>
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:<br>
</p>
<pre>
X | 1 0 0 |
Y | 0 -1 0 |
Z | 0 0 1 |
</pre>
<p>
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:
</p>
<pre>
forward [ 1 0 0 ]
right [ 0 1 0 ]
up [ 0 0 1 ]
</pre>
<b>Example 2:</b>
<p>
Object rotation axis
<br>
<img src="Coordinate_system_documentation/1-2.jpg">
</p>
</body>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</p>
<pre>
<i><font color=blue>
</font>
</i>
</pre>