I'm playing around with the Camera2D class given in the samples. I think this class is easy to use and has good possibilities to manipulate the view of the gameplay scene.
There is only one thing I'm stumbling with. I created a border larger than my viewport. By default the cameras relativ x position is at the half way between left and right border and the cameras relativ y position is bottom border y - half viewport height.
That means I can't see the left, right and top border but the bottom of my border is at the bottom of my viewport when cameras position is (0, 0). Now I can prevent that the area below the borders bottom is shown by setting cameras MaxPosition to (0,
0) -> Camera can't be moved down.
Unfortunatly I can still zoom out so that areas below my bottom border are shown.
In fact outside the border shouldn't be anything at all. It isn't necessary to see anything outside my border. Is there any possibility to tell my camera that it should move directly after zooming in or out if area outside the border is shown?
I don't even know which values are necessary and important to calculate the offset. :-(
Thanking you in anticiption!