Hello! In my project, I want to make an isometry, but I just can not understand how calculations are performed there. I went to different sites, that's what they say to do:
var tilePositionX = (x - y) * width, tilePositionY = (x + y) * height / 2; где x и y координаты тайлов на нашей сетке. It seems to be all well placed 
But, when I start to rotate tiles (and on the websites it is written that I need to rotate the tile by 45 degrees), then I get the following: 
Turned and tiles, and the grid itself. It is then that I start to get lost: I try to move the tiles diagonally downwards - for me they go somewhere upstairs. I do not get it. How to figure it out? Explain, please :)
x' = x*cos(a) + y*sin(a); y'=x*sin(a)+y*cos(a)x' = x*cos(a) + y*sin(a); y'=x*sin(a)+y*cos(a)Read the polar coordinate system . Rotation occurs with respect to (0,0) if the center of rotation needs to be shifted - the f-la becomes more complicated. - nick_n_ax' = ((x - x0)*cos(a) + (y-y0)*sin(a))+x0; y'=((x-x0)*sin(a)+(y-y0)*cos(a))+y0;Here is a rotation with a displaced center (x0, y0), i.e. x0, y0 is the center of your shape (if you want to rotate it around yourself). - nick_n_a