{"id":741,"date":"2013-12-02T22:56:32","date_gmt":"2013-12-02T21:56:32","guid":{"rendered":"http:\/\/labalec.fr\/erwan\/?p=741"},"modified":"2013-12-02T22:56:32","modified_gmt":"2013-12-02T21:56:32","slug":"vb-net-and-article-21-a-simple-2d-camera-version-2","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=741","title":{"rendered":"VB.Net and Article 21 : A simple 2D camera Version 2"},"content":{"rendered":"<p>This time, lets add a zoom and rotating effect on our camera.<\/p>\n<p>And lets re use the rotated sprite class you may have seen in <a href=\"https:\/\/labalec.fr\/erwan\/?p=656\" target=\"_blank\">Article 12 \u2013 Pixel collision on rotated shapes<\/a>.<\/p>\n<p>The only major change in the camera is the following where we will now use the position + rotation + zoom.<br \/>\n<code><br \/>\nviewmatrix = Matrix.CreateTranslation(New Vector3(-position, 0)) * Matrix.CreateRotationZ(_rotation) * Matrix.CreateScale(New Vector3(_zoom, _zoom, 1))<br \/>\n<\/code><\/p>\n<p>The video.<br \/>\n<div style=\"width: 695px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-741-1\" width=\"695\" height=\"417\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2013\/12\/XNA_DEMO_21.mp4?_=1\" \/><a href=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2013\/12\/XNA_DEMO_21.mp4\">https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2013\/12\/XNA_DEMO_21.mp4<\/a><\/video><\/div><\/p>\n<p>The source code.<br \/>\n<a href=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2013\/12\/XNA_DEMO_20.2.zip\">XNA_DEMO_20.2<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 \u2013 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 <a href='https:\/\/labalec.fr\/erwan\/?p=741' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,35],"tags":[],"class_list":["post-741","post","type-post","status-publish","format-standard","hentry","category-dotnet","category-xna","category-34-id","category-35-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=741"}],"version-history":[{"count":1,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/741\/revisions"}],"predecessor-version":[{"id":745,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/741\/revisions\/745"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}