My project is a 2d top down with constrained aspect ratio. So certain window sizes will put some black bars on the sides to maintain the ratio. The project is a room by room style so exiting east or west into the black bars plops you on the next screen. That all works as intended.
However, there are aspects of the game that would have be grab the viewport size and convert the screen size to world space to grab the world location of the screen edges to compare if the edge of something spawned off screen.
When window is sized to where there are no black bars this works as intended. However, when black bars are present, it appears that the viewport size does not subtract or take into account the black bars. Print Sting the viewport size appears to include the black bars.
Depending on how thick the bars are, something can be spawned outside the view of the game but not be flagged as off screen.
It should not do this correct? The view-port size should be the visible space between the black bars if there are any. Is there a way to account for the bars myself?