Timeline for Click on an isometric plane and obtain normal coordinates
Current License: CC BY-SA 4.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 21, 2019 at 15:26 | comment | added | Albert | Works fine. Solution: yI=yI-300; yI=yI*2; var angle = ((-45 * Math.PI /180) * -1); var x2 = xI; var y2 = yI; var cos = Math.cos(angle); var sin = Math.sin(angle); var xI2 = Math.floor(x2 * cos - y2 * sin); var yI2 = Math.floor(x2 * sin + y2 * cos); | |
| May 21, 2019 at 12:42 | history | edited | Albert | CC BY-SA 4.0 | added 341 characters in body |
| May 20, 2019 at 17:44 | history | edited | Albert | CC BY-SA 4.0 | added 526 characters in body |
| May 20, 2019 at 15:56 | history | edited | DMGregory♦ | CC BY-SA 4.0 | Embedding code from answer; edited tags |
| May 20, 2019 at 15:26 | history | edited | Albert | CC BY-SA 4.0 | added 38 characters in body |
| May 16, 2019 at 23:15 | answer | added | Bálint | timeline score: 2 | |
| May 16, 2019 at 16:12 | comment | added | DMGregory♦ | @amitp I'd upvote an answer along those lines. :) | |
| May 16, 2019 at 14:27 | comment | added | amitp | When you have a series of transforms that take you from world coordinates to screen coordinates, you can invert this process by applying the inverse of each transform in reverse order. ctx.rotate(+45 * Math.PI/180); ctx.scale(1, 2.0); ctx.translate(0, -300); should take you from screen coordinates (mouse click) back to world coordinates. | |
| May 16, 2019 at 13:12 | comment | added | DMGregory♦ | We have a lot of existing questions about converting to & from isometric coordinates, so you may be able to find your answer faster in those. | |
| May 16, 2019 at 13:07 | history | edited | Vaillancourt♦ | edited tags | |
| May 16, 2019 at 1:45 | review | First posts | |||
| May 28, 2019 at 2:31 | |||||
| May 16, 2019 at 1:40 | history | asked | Albert | CC BY-SA 4.0 |