Forum Thread
making a gun shoot in unity (Forums : General Banter : making a gun shoot in unity ) Locked
Thread Options
Sep 2 2013 Anchor

Hi everyone so i'm new to video games and i'm attempting a first person shooter i know some javascript and python but thats about it.
so anyway i have been stuck on the main part of a fps game, making the gun shoot! i have googled and youtubed it but nothing seems to work so im seeking advice on this because i'm very close to getting all the main components down i have running walking looking jumping etc. i have been making lots of stuff in blender so once i get this part down and animation i can probably get this into an actual indie game.

Sep 3 2013 Anchor

Are you sure you did your search properly? Simply searching for: "unity gun shoot tutorial" gives tons of results. Both with raycasting and bullets, including scripting in JS. It won't get any easier than a 10 minutes video tutorial...
You should also search the Unity Answers, you will find many, well... answers.... there:

TKAzA Community Manager
Sep 3 2013 Anchor

theres a shooting gallery source you can download,
its basically a tutorial on raycast shooting with physics, pretty handy as a base before you add damage code.

Sep 3 2013 Anchor

i will check out that thanks but i did do research most didnt work and i already know how to make the gun shoot but it looks crappy and i dont know how to add a muzzle flash and stuff and almost al the stuff i find is just the same thing

TKAzA Community Manager
Sep 3 2013 Anchor

adding a muzzle flash i would assume involves a light and a 2d sprite or 3d, attached to a trigger or called via a script that triggers on mouse click.

Im not experienced enough in unity to explain in detail i would fiddle around until i got somthing that works, your best opening demo files like the bootcamp demo and seeing how the did the muzzle flash on their rifle.

Sep 4 2013 Anchor

thank you people :D i hope to release a very early sandbox test in a couple of months once i get this to work

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.