Déc 022013

This time, lets add a zoom and rotating effect on our camera.

And lets re use the rotated sprite class you may have seen in Article 12 – Pixel collision on rotated shapes.

The only major change in the camera is the following where we will now use the position + rotation + zoom.

viewmatrix = Matrix.CreateTranslation(New Vector3(-position, 0)) * Matrix.CreateRotationZ(_rotation) * Matrix.CreateScale(New Vector3(_zoom, _zoom, 1))

The video.

The source code.

 Posted by at 22 h 56 min

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>