Closed Jeremy-Barnes closed 10 years ago
//from toIsoCoord
xIso = xCoord - yCoord;
yIso = (xCoord + yCoord)/2
//from toNormalCoord
xCoord = xIso + yCoord
yCoord = 2*yIso - xCoord
//solve
xCoord = xIso + 2yIso - xCoord
2*xCoord = xIso + 2yIso
xCoord = xIso/2 + yIso
yCoord = 2*yIso - xCoord
yCoord = 2*yIso - xIso/2 - yIso
yCoord = yIso - xIso/2
Thats the system of equations I used to get to my proposed change. It may very well be wrong, everyone should input here because I'm not the best at math.
Yup, my bad. I did fix it, but forgot to commit it.
Okay, cool. I thought I was going crazy. Thanks!
I'm altering the toNormalCoord method in Globals (formerly in Camera) because the math doesn't seem to check out.
Robin, that method was yours, can you verify where that math came from or show me how I'm wrong? It should be the exact inverse of toIsoCoord, right?
For reference, the toIsoCoord method (which is correct) is:
The toNormalCoord method used to be (and I think this math is bad, but please everyone double check me):
My proposed change is this: