I am working on a personal project and am trying to make a 2d tile map render that needs to handle rotation.
I am using raylib to handle the drawing stuff onto the screen and am using this function to draw a tile:
void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, Color tint);
How do I calculate the new coordinates of the tiles after the rotation and the individual rotation of each tile if I want to rotate the tile map?
I also need to figure how to do mouse click detection for tiles when they are rotated with their new coordinates and how to do ‘collision detection with cursor’ with rotated squares/tiles.
And due to the way the project is set up I cannot rotate the camera.