Search Unity

InfiniGun: Universal Firearm

Discussion in 'Assets and Asset Store' started by AedanCGraves, Oct 3, 2019.

  1. AedanCGraves

    AedanCGraves

    Joined:
    Jan 6, 2016
    Posts:
    14
    Hi all! I'm Aedan your fellow game developer, You may know me from my First Person AIO. but today, after months of work, I'm happy to announce the release of of my brand new asset InfiniGun! A universal Firearm system for your FPS game.
    It includes features such as:
    • An Integrated Attachment System
    • Projectile and Raycast firing methods
    • Assorted Fire Modes
    • Recoil
    • Automatic UI
    • Various FX
    • Scope Sway
    • Target System
    • And much more!

    In this post I'll briefly go over how to set up a gun, attachments, and a target from scratch.
    1. Make an empty Gameobject and add the InfiniGun script, then attach the Gun model if any as a child.

    2. Make a new Gameobject as a child to the Gun model and position it to the tip of the barrel of the Gun model and assign the object to the "Muzzle Tip" field in the InfiniGun script. Note that this can also be used as a attachment mounting point for barrel attachments.

      From here, the gun is functional and you can use preset values from the context menu. we'll keep going to add a bit more flare and add attachments.

    3. Set the "Firing Method" value to "Projectile" and set the color of the projectile.

    4. Set the "Magazine Capacity" and "Reserve Ammo Capacity" to desired size.

    5. Set the desired fire modes and respective values.

    6. Align the built in sights along the Y axis by setting "Aiming Center Y" value until the red sphere gizmo is just above the Gun models built in sights.

    7. To make an attachment mounting point, create a new Gameobject and position it to where you'd like an attachment to be mounted. Rotate it to face the right direction for your model and attachment (Y is up and Z is forward). Child this object to any part of the model so rotation and animation of the model will also effect the attachment. Do this step for as many attachment mounts as you'd like on this gun.

    8. Press "Add Attachment" to add an attachment entry, in the entry you can assign the mounting point object made in the last step to the "Attachment Mount Point" field and add prefab to the "Attachment Prefab" field. Repeat this step as for all the mounting points you've made then press "Update Attachments" to update and spawn attachments.

    9. Change the "Gun Class" field to what ever class best suits the gun.

    10. Enable "Auto Generate UI" and "Auto Generate Crosshair" then assign a sprite to the "Crosshair Sprite" field.
    Done! That's how you make a firearm from scratch!

    1. Make a new Gameobect and set the position to (0,0,0). Add the Attachment Script to the object.

    2. Set the "Attachment Type" field to what ever attachment you're making, for this example I'll use "Misc Barrel Attachment".

    3. Set the "Recoil Fore Modifiers" and "Cone of accuracy Modifier" to the desired values.

    4. Add a 3D model of the attachment either to the object made above or as a child to the object above.

    5. Finally, Prefab the Object and assign it to a gun's "Attachment Prefab" value.

    Add Target script to either a new Gameobject with a model and a collider set fields to the desired values, or add the Target script to an already existing Enemy with AI and a collider then set desired values (you'll need to modify the AI to use the Target Health values.)

    Sorry if any of this is unclear, I don't have much experience writing tutorials. just ask and I'll try to elaborate as much as I can.

    As per the usual I'm always looking for feedback and would love to hear what you think of it. And if you're experiencing issues or just have a question I encourage you to contact me about it first before leaving a review. I'm always happy to help fix something or explain something, that way you get your problem fixed, I know what needs to be made simpler/more reliable, and other users don't have similar problems. everyone benefits. leaving an angry review saying "the asset doesn't work" with no further explanation helps no one and isn't a good way to help this community grow.

    Thanks for reading!
    Aedan Graves
     
    Daniel466 and Neviah like this.
  2. Daniel466

    Daniel466

    Joined:
    Apr 9, 2014
    Posts:
    69
    Really nice asset for the super cheap price ;)
     
  3. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    302
    do you have a video showing what this asset does exactly?
     
  4. AedanCGraves

    AedanCGraves

    Joined:
    Jan 6, 2016
    Posts:
    14
    Currently I don't. I've become extremely busy with work after I published this asset and haven't had time to do much more than help with support queries on my other asset. I may have time after Thanksgiving, we'll see.