Swapping axis labels between 2D and 3D coordinates
Posted
by
Will
on Game Development
See other posts from Game Development
or by Will
Published on 2011-04-12T11:48:06Z
Indexed on
2011/11/17
2:05 UTC
Read the original article
Hit count: 246
vector
|coordinates
My game world is 3D.
The map is only 2D, however.
It is natural to think of the map as having an X and Y axis.
And it is natural to think of the world has having an X, Y and Z axis, where Y is upwards.
That is to say, X Y in 2D map coordinates is X Z in 3D coordinates.
What conventions and approaches do you have to keeping things straight at a code level to make mapping between them natural?
(Is Y usually upwards in 3D? Or do you have X and Z in map coordinates, or?)
© Game Development or respective owner