P0-P-172: Part 56: Small Arms
I have finally added weapons (small arms, at least) to the project. This isn’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.
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.
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.
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.
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’s built in “fire” 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.

29/11/2016 , 12:28:43 AM
Unity Personal (64bit) – P0Main.unity – New Unity Project – PC, Mac & Linux Standalone

28/11/2016 , 11:35:20 PM
Unity Personal (64bit) – P0Main.unity – New Unity Project – PC, Mac & Linux Standalone

28/11/2016 , 03:59:14 AM
Unity Personal (64bit) – P0Main.unity – New Unity Project – PC, Mac & Linux Standalone
.
