Hi all,
I’ve developed several 2d games in C++/C# and now i’m trying to do something with Unity.
Using XNA the 0, 0 coordinates are top, left and Y increase going down… this is great to create maps in bidimensional array.
So, I have this map in memory ( new array[r, c] )
1 0 0 0 0
0 0 0 0 0
0 0 0 0 1
0 0 0 0 1
and I know that at the array 0, 0 I have the tile “1” to put at the 0, 0 (multiplayed per tile dimension) on screen and at 4, 3 of the array, 4, 3 on screen too.
Using isometric tiles, I simply use these two formulas to find the screen position
iso.x = pos.x - pos.y;
iso.y = (pos.x + pos.y) / 2;
So 0,0 is 0,0, and 4, 4 is 2, 4
But on Unity I have 0, 0 on center screen (camera) and Y goes UP as increase, and that approch is not possibible anymore
So, here’s the question: How can I convert the coordinates on screen coordinates? Or, Do I need to modify my map system?
Any help will be appreciated
Thanks