Hi, I have the following code:
view.reset(sf::FloatRect(mainLevel->rooms[i]->roomSprite.getPosition().x, mainLevel->rooms[i]->roomSprite.getPosition().y, window.getSize().x, window.getSize().y));
window.setView(view);
std::cout << "Room Position: (" << mainLevel->rooms[i]->roomSprite.getPosition().x << ", " << mainLevel->rooms[i]->roomSprite.getPosition().y << ")" << std::endl;
std::cout << "Viewport: (" << window.getView().getViewport().left << ", " << view.getViewport().top << ")" << std::endl;
However, when I have the viewport position log, it is at (0, 0) when the room position is at (-75, -75). This happens even if I hardcode the (-75, -75) into it. Does anyone know why this happens? Thanks!