public
Created

screen and isometric space

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9
Screen -> Isometric space equations
iX = (((ScreenX) / tileWidth) - ((ScreenY) / tileHeight));
iY = (((ScreenX) / tileWidth) + ((ScreenY) / tileHeight));
 
Isometric -> Screen space equations
ScreenX = (iX + iY) * tileWidth / 2;
ScreenY = (iY - iX) * tileHeight / 2;
 
Assuming the isometric coordinating system goes as this: http://i.imgur.com/aUM4g.png

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.