Click on an isometric plane and obtain normal coordinates

by ALBERT BENAVENT   Last Updated May 16, 2019 02:13 AM

I have photos distributed as cells. When I click, I get the corresponding row and column. console.log("Col:" + X + "Row:" + Y);

When applying an isometric view conversion like this:

ctx.translate(0, 300); ctx.scale(1, 0.5); ctx.rotate(-45 * Math.PI /180);

I do not know what mathematical formula applies to get the coordinates correctly.

Regards.



Related Questions


Updated December 24, 2016 07:36 AM

Updated May 07, 2018 02:13 AM

Updated March 17, 2017 16:13 PM

Updated July 27, 2016 08:05 AM

Updated December 12, 2016 08:05 AM