git
Jul 23rd, 2001, 07:32 AM
Hiyas,
I'm trying to figure out how to convert a X/Y position within an isometric tile to a blit position.
For example.....a bullet is currently at the point 10.2,13.7 on a map. If you take away the main integer portions, you get the position 0.2/0.7 (approx. bottom left on a grid) in a 1x1 square...
Now, if I have a 40x19 pixel isometric tile, where 0,0 is represented at the middle top, 1,0 is represented at the middle right, 0,1 is represented at the middle left, and 1,1 is represented at the middle bottom, how do I find where on this 40x19 pixel grid the bullet would be?
If you don't have a clue what I'm on about, imagine a position within a grid tile (eg. 0.3, 0.9), and how you would retrieve that as an x/y position of an isometric tile. (here's hoping that explained it in a nutshell ;))
I tried to write some code to do this, but I totally lost track of how I was trying to solve the problem....heh.
Thanks for any help!
-Git
I'm trying to figure out how to convert a X/Y position within an isometric tile to a blit position.
For example.....a bullet is currently at the point 10.2,13.7 on a map. If you take away the main integer portions, you get the position 0.2/0.7 (approx. bottom left on a grid) in a 1x1 square...
Now, if I have a 40x19 pixel isometric tile, where 0,0 is represented at the middle top, 1,0 is represented at the middle right, 0,1 is represented at the middle left, and 1,1 is represented at the middle bottom, how do I find where on this 40x19 pixel grid the bullet would be?
If you don't have a clue what I'm on about, imagine a position within a grid tile (eg. 0.3, 0.9), and how you would retrieve that as an x/y position of an isometric tile. (here's hoping that explained it in a nutshell ;))
I tried to write some code to do this, but I totally lost track of how I was trying to solve the problem....heh.
Thanks for any help!
-Git