Set a drawing viewport while using camera

Posted by Mariano on Game Development See other posts from Game Development or by Mariano
Published on 2013-11-09T06:48:02Z Indexed on 2013/11/09 10:17 UTC
Read the original article Hit count: 290

Filed under:

I'm working with XNA. I already have a basic world made of tiles and a camera using a transform matrix. I have a character moving around and the camera follows. What I want to do now is draw the map only on a certain part of the screen as shown on the figure below. This way I can move the map to the left of the screen and have the other fixed parts shift to the right.

Do I need to modify the camera matrix? Make a new viewport?

Screen

© Game Development or respective owner

Related posts about XNA