Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently building a 3D game presented from a 2D isometric viewpoint.

The 3D coordinates start at the top left corner of the screen with x and y increasing towards the right and bottom edges respectively. An angle about the z axis starts with 0 facing right and increases CW.

The isometric coordinates use the diamond method seen in this reference:

enter image description here

My problem is related to choosing the correct frame for my characters. The characters each have a sprite sheet containing an image for one of the 8 compass directions. The start with the image facing right and rotate CW as in the 3D coordinates.

How can I choose the correct sub-image based on their rotation in 3D space? Is the problem is equivalent to converting the rotation into the isometric coordinate space?

share|improve this question

Yes, the problem is the same as converting rotation to the isometric coordinate space. Though, it's somewhat simpler.

The primary "conversion" takes place by deciding how the rotation applies to the compass directions. For example, deciding that north is 0 degrees. Choosing the sprite to use is as simple as breaking a full 360 degrees in the the 8 compass directions.

See my answer here for an easy way to convert angle into compass directions.

share|improve this answer
This is useful, but it doesn't explain how to perform the angle conversion. – Nick Mar 20 '13 at 20:46
@Nick You did see the answer I linked? The conversion is pretty straight forward, what about it do you not understand? – Byte56 Mar 21 '13 at 4:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.