tile map coordinate

Started by
3 comments, last by phaelax 19 years, 1 month ago
Hi all, I plot the tiles(iso) to screen like this(Map coordinate), (0,0) (1,0) (2,0) (3,0).... (1,1) (2,1) (3,1).... (0,2) (1,2) (2,2) (3,3).... ........................ If I use the mouse click on the screen then I get the screen coordinate of the mouse pointer. My question is, how to I get the map coordinate of the mouse pointer, so I know the mouse pointer located which tile. Thank you.
Advertisement
need the size of the tile.

size = 64

mapX = (int)mouseX/size
mapY = (int)mouseY/size
BRING BACK THE BLACK (or at least something darker)
I think that what kslam is looking for is for diamond tiles, not square...

http://www.gamedev.net/reference/articles/article2026.asp

This article has a section about mousemaps... basic idea should work for you.
BRING BACK THE BLACK (or at least something darker)
I wrote this once. The missing images are not really needed, just nice
whoops. forgot i was in isometric land.

This topic is closed to new replies.

Advertisement