ItchyPancake
New member
- Joined
- Nov 19, 2014
- Messages
- 1
Hey there! I am working on a video game and am using a formula to take an X & Y coordinate, and transfer it into an isometric coordinate.
isoX = x-y
isoY = (x+y)/2
That is my basic formula to calculate my new isometric coordinate. Now, the 2d objects that use this code are invisible, so all you see is the new isometric object.
When I click my mouse, I get the coordinates from the flat 2d graph, not the isometric one.
I want to be able to click, and transfer the (x,y) into the 2d graph based on the position from the isometric one.
So, if i'm correct, I would need to do that part by running those 2 formulas above, backwards!
But there is an issue!
the scale for isometric objects is 1:2 instead of your normal 1:1
Lets say x = 10 and y = 4
so,
isoX = 6
isoY = 7
Okay. Now, we want the reverse. If I click on the isometric coordinate of (6,7), The formula needs to convert the numbers back into (10,4)
BUT I can't figure out how.
The opposite of isoX = x-y
SHOULD be normalX = y+x
here is the issue.
normalx =6+7 = 13. I needed it to be 10, not 13
please help me! Haha, I really don't want to trash the isometric view.
isoX = x-y
isoY = (x+y)/2
That is my basic formula to calculate my new isometric coordinate. Now, the 2d objects that use this code are invisible, so all you see is the new isometric object.
When I click my mouse, I get the coordinates from the flat 2d graph, not the isometric one.
I want to be able to click, and transfer the (x,y) into the 2d graph based on the position from the isometric one.
So, if i'm correct, I would need to do that part by running those 2 formulas above, backwards!
But there is an issue!
the scale for isometric objects is 1:2 instead of your normal 1:1
Lets say x = 10 and y = 4
so,
isoX = 6
isoY = 7
Okay. Now, we want the reverse. If I click on the isometric coordinate of (6,7), The formula needs to convert the numbers back into (10,4)
BUT I can't figure out how.
The opposite of isoX = x-y
SHOULD be normalX = y+x
here is the issue.
normalx =6+7 = 13. I needed it to be 10, not 13
please help me! Haha, I really don't want to trash the isometric view.
Last edited: