After browsing the web and reading dozens of examples and tutorials I still can't figure out how to translate mouse X;Y screen position in pixels to X;Y isometric tile index. All the examples I tried returned strange values.

The attached picture shows exactly the tiles' redering order. The Zig-Zag rendering mode was so simple to implement with the help of a colored coded tile. But this diamond shapped design is really giving me a hard time.

I guess the formula involves the following variables:

- MousePos.X

- MousePos.Y

- TileWidth

- TileHeight

- ScreenWidth

- ScreenHeight

Now I just need to know how to put the pieaces the together as I really can't see any logic behind it.

Thank you very much for any possible help.

Attached Thumbnails

"Sometimes you may think you're alone but that's not true, where ever you go, Death is always near and always watching you." By me January 2007

I already knew those links. The first one doesn't explain how having the mouse at the middle-top of the screen translates itself to 0,0 isometric coordinates. wtihout knowing this the colored tile is useless. As for the second link, I'm affraid that math is too advanced o me...

"Sometimes you may think you're alone but that's not true, where ever you go, Death is always near and always watching you." By me January 2007

Basic Flying Rules:Try to stay in the middle of the air. Do not go near the edges of it. The edges of the air can be recognized by the appearance of ground, buildings, sea, trees and interstellar space. It is much more difficult to fly there.