In terms of 2D I don't understand what a viewport is and what it is used for. I am trying to build a side-scroller and believe I need the viewport for the map scrolling part.
Consider a Tv displaying a scene, the viewport is simply the area of the scene that is captured by the camera.
Another way of thinking about it is the way some cameraman hold up their thumbs and index fingers to 'frame' a scene, or hold up a hollow picture frame, the light that passes through that frame is the viewport.
For a visual example, consider this gif, the green rectangle is the viewport:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With