So, I drew in Tiled Map Editor an isometric map and add layers of object (see the pictures below in a hide).
Then I draw a map through the tinyXml , but with the objects there was a problem. Code I get from https://en.sfml-dev.org/forums/index.php?topic=3023.0 (https://en.sfml-dev.org/forums/index.php?topic=3023.0) but modifies it somewhat for an isometric map. But I could not change the mapping of objects. To get the rect of my layer of objects, i use sf::Rect but i get an ortogonal rectangle
Object object;
object.name = objectName;
object.type = objectType;
object.sprite = sprite;
sf::Rect<float> objectRect;
objectRect.top = y;
objectRect.left = x;
objectRect.height = height;
objectRect.width = width;
object.rect = objectRect;
How can this rectangle of objects be tilted to isometric view?
(https://i.gyazo.com/e67cabfcd81871851d9e6e8a385f65e1.png)
(https://i.gyazo.com/ee24d4a058c1e92a431f0f4596574202.png)
The white rectangle in the picture is the visualization of my layer of objects, that is, the way it looks in my code.
Full code here https://pastebin.com/U1NG8eKD (https://pastebin.com/U1NG8eKD)
So, i create my own "rectangle" with sf::Vertex. How i can check intersection of my Vertex(isometric) rectangle and a standart rectangle with sides parallel to the axes?
(https://i.gyazo.com/abc53e6782a94ff80665c881938da562.png)