{"id":1350,"date":"2021-11-29T22:32:11","date_gmt":"2021-11-30T03:32:11","guid":{"rendered":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/?p=1350"},"modified":"2021-11-29T22:33:00","modified_gmt":"2021-11-30T03:33:00","slug":"projectile-physics-leighton-snyder","status":"publish","type":"post","link":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/2021\/11\/29\/projectile-physics-leighton-snyder\/","title":{"rendered":"Projectile Physics &#8211; Leighton Snyder"},"content":{"rendered":"\n<p>This one took a bit to get right, but I have something operational I think. Multiplying the bullet speed by delta gave me some weird effects when moving while shooting, but removing that seemed to fix it. I&#8217;m also still trying to find the best way to align the bullet and the gun. Currently I have a point on the gun barrel where it spawns, but that can create weird effects when the cursor gets close to the player.<\/p>\n\n\n\n<p>Also just a note for others, if you are concerned with crosshair accuracy: make sure that when you change the cursor to your crosshair sprite in Godot, you change the &#8220;image hotpost&#8221; in settings to align with the center of your crosshair. It makes it the top left of your sprite by default, which makes your shots a bit less accurate. My  cursor sprite was 17 x 17, so I set my hotspot x=9 and y=9 to align with the center of the crosshair.<br><br>Here&#8217;s my player exterminating a bunch of snakes:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-content\/uploads\/sites\/1770\/2021\/11\/Projectiles_Trim.mp4\"><\/video><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This one took a bit to get right, but I have something operational I think. Multiplying the bullet speed by delta gave me some weird effects when moving while shooting, but removing that seemed to fix it. I&#8217;m also still trying to find the best way to align the bullet and the gun. Currently I&hellip; <a class=\"more-link\" href=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/2021\/11\/29\/projectile-physics-leighton-snyder\/\">Continue reading <span class=\"screen-reader-text\">Projectile Physics &#8211; Leighton Snyder<\/span><\/a><\/p>\n","protected":false},"author":4194,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"portfolio_post_id":0,"portfolio_citation":"","portfolio_annotation":"","openlab_post_visibility":"","footnotes":""},"categories":[43,78],"tags":[],"coauthors":[23],"class_list":["post-1350","post","type-post","status-publish","format-standard","hentry","category-developer","category-projectile-physics","entry"],"_links":{"self":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/posts\/1350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/users\/4194"}],"replies":[{"embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/comments?post=1350"}],"version-history":[{"count":2,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/posts\/1350\/revisions"}],"predecessor-version":[{"id":1353,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/posts\/1350\/revisions\/1353"}],"wp:attachment":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/media?parent=1350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/categories?post=1350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/tags?post=1350"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-270-fall-2021\/wp-json\/wp\/v2\/coauthors?post=1350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}