Coordinates

From Valve Developer Community
Revision as of 15:11, 14 January 2009 by TomEdwards (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
A two-dimensional coordinate system

Coordinates are used to store locations. They are represented as groups of numbers, one per dimension, which taken together can be used to find a location on a grid (or, less commonly, a line). Each value is relative to the current origin.

Coordinates in Source are (X,Y,Z), where X is right, Y is forward, and Z is up. (0,0,1), for example, is a point one unit directly above the origin.

Tip.pngTip:SDK tools generally align coordinates so that the camera is looking down the -Y axis, since this tends to have the effect of making the item in question face you. Remember that this makes X appear reversed.

Coordinates are often stored alongside a set of rotation angles.

See also