{"id":4330,"date":"2016-12-04T23:16:06","date_gmt":"2016-12-04T23:16:06","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=4330"},"modified":"2016-12-04T23:19:18","modified_gmt":"2016-12-04T23:19:18","slug":"p0-p-172-part-56-more-guis-and-morph3d-character-system","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-p-172-part-56-more-guis-and-morph3d-character-system\/","title":{"rendered":"P0-P-172: Part 56: Small Arms"},"content":{"rendered":"<p>I have finally added weapons (small arms, at least) to the project. This isn&#8217;t a hugely important feature, so it was not until now that I really looked into it.<\/p>\n<p>I have used a weapon model from a free unity asset pack, I intend to replace this with one of my own when I can.<\/p>\n<p>I have added a muzzle flash, bullet hole impact decals, sounds, and spent casings being ejected from the weapon. I have also added a simple inventory system to allow the user to carry the weapon, and draw it when needed.<\/p>\n<p>The targets that I created now have working collision and animations, so the player can shoot them and they will rotate backwards and then return to their vertical position.<\/p>\n<p>The gun is also not 100% accurate, I added an offset to each bullet that means the shots will land in the approximate, but not exact, location of the cursor, I think this is a lot more realistic. I could also reduce this offset as the player practices more, etc.<\/p>\n<p>The muzzle flash that I am using works ok for now, but I plan to try to use a particle effect in the future. Unity&#8217;s built in &#8220;fire&#8221; effect looks great, and if I could use that as a muzzleflash, it would look at lot better than the animated graphic I have now.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_4328\" aria-describedby=\"caption-attachment-4328\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-12_28_43-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4328\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-12_28_43-AM-300x163.jpg\" alt=\"Unity 29\/11\/2016 , 12:28:43 AM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-12_28_43-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-12_28_43-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-12_28_43-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-29_11_2016-12_28_43-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4328\" class=\"wp-caption-text\">Unity<br \/>29\/11\/2016 , 12:28:43 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4327\" aria-describedby=\"caption-attachment-4327\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-11_35_20-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4327\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-11_35_20-PM-300x163.jpg\" alt=\"Unity 28\/11\/2016 , 11:35:20 PM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-11_35_20-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-11_35_20-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-11_35_20-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-11_35_20-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4327\" class=\"wp-caption-text\">Unity<br \/>28\/11\/2016 , 11:35:20 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4326\" aria-describedby=\"caption-attachment-4326\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-03_59_14-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4326\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-03_59_14-AM-300x163.jpg\" alt=\"Unity 28\/11\/2016 , 03:59:14 AM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-03_59_14-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-03_59_14-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-03_59_14-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/12\/PhoenixGameDevelopment-28_11_2016-03_59_14-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4326\" class=\"wp-caption-text\">Unity<br \/>28\/11\/2016 , 03:59:14 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<p>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have finally added weapons (small arms, at least) to the project. This isn&#8217;t a hugely important feature, so it was not until now that I really looked into it. I have used a weapon model from a free unity asset pack, I intend to replace this with one of my own when I can. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,17,10,11],"tags":[],"class_list":["post-4330","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-p-0","category-software-and-games","category-spiritus-astrum","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4330"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=4330"}],"version-history":[{"count":3,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4330\/revisions"}],"predecessor-version":[{"id":4350,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4330\/revisions\/4350"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=4330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=4330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=4330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}