Hello everyone, I’m having some trouble implementing map rotation in my demo. I’m trying to rotate an isometric grid by 90 degrees so the user can look at the map from different angles. The effect I want is illustrated below via the two images. I am using both a 2d camera and 2d nodes.
Original Position:
After rotating 90 degrees:
Below is also a screenshot of all the code I’m using to rotate the cells. This seems to work for a “normal” (non-isometric) graph but once it gets projected to an isometric view it gets messed up.
Some more information I think is relevant is that the tiles I’m using are 32x32 but for the isometric view they are 32x16. The settings are as follows:
I would appreciate any and all help. Thanks in advance
Whats confusing me is that 90 degrees and 270 degrees are the same, but rotation ends up different. i think something has to be changed with the rotate_vector_90_clockwise-method
Have you tried changing the Tile Layout property from stacked to anything else? For a none square tile shape it can help sometimes.
Failing that, you could try printing out a tiles position before and after the rotation to see exactly what exactly is happening is to help figure it out.
This is very odd. But you can apply a manual rotation and look at it in “Flat”-view and then compare to the 0-degree rotation and check how the tiles have to be moved
I changed the Tile Layout from “Stacked” to “Diamond Right” and it worked ! Apparently the code itself was correct, I just needed to change that one setting. Now the new problem is getting multiple z levels to rotate correctly. Since that is beyond the scope of the question I originally asked, I will mark your suggestion as the solution.