How to Make a gun shoot in Unity - Raycast and Prefab | FPS TUTORIAL 4

Поделиться
HTML-код
  • Опубликовано: 22 окт 2024

Комментарии • 379

  • @JamaDose
    @JamaDose 11 лет назад

    I like watching other unity game developers in the youtube community be helpful with these simple things like shooting which really do help the new people.Well done man.You deserve a gold star :')

  • @atomicbeef7887
    @atomicbeef7887 10 лет назад +75

    MY EARS! MY GOD MY EARS! THAT INTRO! WHY IS IT SO LOUD?!

    • @chandlerfranklin9937
      @chandlerfranklin9937 10 лет назад +8

      seriously
      this needs to be fixed

    • @hyperlink463
      @hyperlink463 10 лет назад +5

      ***** "My ears! My god my ears! That eargasm!"

    • @davidcrabb6358
      @davidcrabb6358 10 лет назад +2

      DEAR GOD YOU JUST MADE ME WANT TO HEAR IT AAAAHHHH GOOOD LORD
      WAY TOOOOOOO LOOOOUUUDDDDD

    • @hyperlink463
      @hyperlink463 10 лет назад +1

      "Dear god, you just made me want to hear it, AAAAAH FUCK YES, SO GOOD!!"

    • @Bionicle4evr21
      @Bionicle4evr21 10 лет назад +1

      What are u talking about THAT SOUNDED AWESOME!

  • @slumberditch
    @slumberditch 11 лет назад

    Dude you're now on my top 10 favorite RUclipsrs.

  • @glasspopcorn
    @glasspopcorn 11 лет назад

    Keep making videos dude, They are amazing. Keep up the amazing work.

  • @GboxLP
    @GboxLP 11 лет назад +2

    Using my game in my college portfolio to get into ict programming thanks alot mate!

  • @KrestenGiese
    @KrestenGiese 9 лет назад +7

    This isn't a tutorial, this is a "get this shit, put this shit here and voila!"

  • @Ryan1236
    @Ryan1236 9 лет назад

    Thank you so much. I love your tutorials and this is the only one I can find of aim down the sites that actually works for me. Thanks you friend. You earned a new subscriber :)

  • @teamO_X
    @teamO_X 10 лет назад +1

    is see you how your video improvements in just every episode..KIU.

  • @TronciM
    @TronciM 11 лет назад +8

    Your voice got deeper from your previous tutorials xD

  • @insaneprojects5320
    @insaneprojects5320 9 лет назад

    I love you I searched a tutorial to make a gun shoot for months and I finally found one (#nohomo)

  • @R8FKL
    @R8FKL 10 лет назад

    I FIXED IT!!! My player would no longer do its animation after I deleted the first one (I thought the constant movement without pressing "w" was a glitch so I deleted it). All you have to do is delete your arms and gun and redo, takes 5 mins max (if your a slow typer)

  • @wuyanchu
    @wuyanchu 10 лет назад +1

    very nice tutorial..
    clear and with good edit of tutorial video..
    a sincere blessing from hong kong...
    god bless u mister ninja and the world..
    ^___^

  • @HeebscuGaming
    @HeebscuGaming 11 лет назад

    You are a huge inspiration to me in game development I am only 12 (almost 13) and I have attempted multiple times to get into game development and failed and this video really re-Resurrected my hope in making my own game thank you. :) *Subbed*

  • @MyKeko15
    @MyKeko15 11 лет назад

    he has warface on his dual screens, i'm in love with this guy

  • @NoahNunez2015
    @NoahNunez2015 10 лет назад +1

    Whenever i try and add the script to the gun to make it shoot it says Assets/novashot_gun_scripts_136/Gun.cs(5,14): error CS0101: The namespace `global::' already contains a definition for `Gun'

  • @adiljawad9
    @adiljawad9 11 лет назад

    When is the next part coming out? These tutorials are awesome!

  • @johnappleseed10
    @johnappleseed10 11 лет назад

    Thanks so much for this tutorial just what i needed the gun script is amazing!! For the next tut it would be great if u taught us how to add zombies! AND CONGRATZ ON 1000 SUBS!

  • @MeowIRL
    @MeowIRL 9 лет назад +5

    My cursor disappears and reappears really fast. Im going to name it blinky :)

  • @jordan91578
    @jordan91578 11 лет назад

    dude i really love your tutorials thanks man thanks so much i will subscribe and tell all my friends :):):):)

  • @YMilkshake
    @YMilkshake 9 лет назад +15

    Damn your voice changed in between tut 3 and 4 :D

  • @ashleydlopes
    @ashleydlopes 9 лет назад

    I was the 14,900 subscriber!

  • @adityamudgil7392
    @adityamudgil7392 7 лет назад +2

    when i import the nova gun pack that is "$novashot_cod_style_weapons_201.unitypackage"
    this create a lot of error then i import it
    errors are
    Assets/WeaponScripts/Explosion-Advanced.js(30,25): BCE0144. 'UnityEngine.Component.rigidbody' is obsolete . Property rigidbody has been deprecated. Use GetComponent()instead. (UnityUpgradable)
    and 4 other similar error
    how i fix it

  • @FrodoThaHobo
    @FrodoThaHobo 10 лет назад +1

    Cant download the gun package from the Unity forum (COD style) It only shows a script! Please help.

  • @JPaitPlays
    @JPaitPlays 10 лет назад +3

    The screen just zooms in when I'm clicking the right click

  • @playastation4640
    @playastation4640 9 лет назад

    if you get this : NullReferenceException: Object reference not set to an instance of an object ---- all you need to do is put the aim down sights script on the camera in first person controller not on the arms

  • @NeonDefense385
    @NeonDefense385 7 лет назад

    So when I wanna make a Counter Strike thing then screw all of those animations right?

  • @pemiem33
    @pemiem33 9 лет назад +22

    So this is a "tutorial" eh? more like "putthisherebambbehappywithit" title misleading

    • @someoneelse1939
      @someoneelse1939 9 лет назад

      easter egg.

    • @popnimpop5278
      @popnimpop5278 8 лет назад

      +Richard Wellman (Trys10Studios) I agree with you and believe they are just hoping they can claim they made a game while all they did was copy him word for word.

  • @hellomynameisweird1
    @hellomynameisweird1 10 лет назад

    I get a null reference when I try to aim down my sight, the gun doesn't move down the middle of my screen, it justs zooms in my camera! Help!

  • @JavierCepa
    @JavierCepa 11 лет назад

    Also, you can use the asset called "Advanced Projectile Editor" in the unity asset store. It really makes it a breeze

  • @Presleysixty
    @Presleysixty 9 лет назад

    lol an ad for "want to make your own videogame or app" Im all like what do you think im doin'!

  • @pukincactus
    @pukincactus 11 лет назад

    Very good. Question, I placed the 1st person controller model and then edited the map, then he would always fall through the map, and the camera would fly up. (I have it viewed in 2 screens) it would work before, I just don't know what happened.

  • @Ollie0602
    @Ollie0602 10 лет назад

    im using winrar so how do i extract the files to my unity assets because when i drag the scripts in it does show them and i comes up with an error in the bottom left corner

  • @de2truction
    @de2truction 10 лет назад +1

    stan sb at the end :)

  • @ravenklaw5672
    @ravenklaw5672 8 лет назад

    it was awesome! i am having problems getting to the gun and player,how can i zoom to them??

  • @marcelhinds2598
    @marcelhinds2598 9 лет назад

    have to admit you're the best

  • @HardcorePS3gamers
    @HardcorePS3gamers 10 лет назад

    i've used the prefab gun and it wont spawn the bullet, Whats wrong? there is not "bullet spawn" place, or any way to spawn bullets

  • @yolahola1
    @yolahola1 10 лет назад +3

    "Can't add component 'gun' because it doesn't exist" Am I the only one that gets this when I add the gun script to my gun?

    • @rasca0027
      @rasca0027 9 лет назад

      you can just delete the Gun Movement script in the same folder, and do it again :)

  • @isaacwade1892
    @isaacwade1892 11 лет назад

    My gun motion isnt working, it sort of clips through my hand? can you help? I have the script on the hand, with the gun object attached. Thanks!

  • @HappyLamaProductions
    @HappyLamaProductions 11 лет назад

    Best.
    Intro Song.
    Ever.

  • @rocketmonkeygamer8078
    @rocketmonkeygamer8078 10 лет назад

    THANKS BEST TUTORIAL EVER

  • @gogamesgroup
    @gogamesgroup 8 лет назад

    I need help I dont know which script to use for the gun to shoot and i don't have any of those prefabs! PLease Help!

  • @BADblueRANGER
    @BADblueRANGER 11 лет назад

    and congrats on 1000 subs

  • @amadeuskorunic7838
    @amadeuskorunic7838 10 лет назад

    ***** i cant find the finished package download, I looked through all your tutorials and i cant find it, please help!

  • @CHILLYDOGZZ
    @CHILLYDOGZZ 10 лет назад

    ***** Hi i have been watching all of your tutorials, but ever sence tutorial 3 i have been having problems. It started when i tryed to make a script for walking and i kept on getting a problem message saying that i had a problem with my script. so i desided to skip that and just go on with the other stuff and now my gun movement wont work and also i did the aiming thing and it shows that every thing is working fin and when i right click it would change numbers but the gun wont move and aim down the sight. Please help me!

  • @TheGamingKiwi1
    @TheGamingKiwi1 9 лет назад +2

    HELP i after i put the aimdown sight and everything it gave me object reference not set to an instance of a object

    • @onesaltypringle162
      @onesaltypringle162 9 лет назад

      TheGamingKiwi1 i know me too, did you find a solution?

    • @TheGamingKiwi1
      @TheGamingKiwi1 9 лет назад

      Jake Heinen i have not..i have switched to unreal engine 4

    • @arjunkatoch8916
      @arjunkatoch8916 9 лет назад

      TheGamingKiwi1 the same thing is happening to mee too help !!

    • @onesaltypringle162
      @onesaltypringle162 9 лет назад

      Skip to one of the last tuts!

  • @marky7870
    @marky7870 9 лет назад

    i got a question you use a different codes in gun script, i download your assets and scripts in unity forum can you pass the code that you use in this video. by the way thanks for tuitorial

  • @Ladymoo78
    @Ladymoo78 10 лет назад

    Following on from tutorial 3 I'm one of the ones that, the gun animation plays continuously regardless if I press w. At what stage are you going to share a resolve for this. Please

  • @OddBranch
    @OddBranch 9 лет назад

    Nice tutorial but the shooting script just wont work for me, I selected a bullet and the gun but there is still no visible shot

  • @raynered1369
    @raynered1369 8 лет назад

    When I try to use the gun script I get an error saying: assets/gun.cs(62,15): error CS0246: The type or namespace name 'projectileInfo' could not be found. How do I fix this.

  • @DankerCoder
    @DankerCoder 7 лет назад +1

    the site is down
    ... the dropbox for the scripts i mean

  • @julianpizano5586
    @julianpizano5586 8 лет назад

    the script had an error
    Assets/Scripts/Gun.cs(62,15): error CS0246: The type or namespace name `ProjectileInfo' could not be found. Are you missing a using directive or an assembly reference?

  • @AVACODOSOFLAW
    @AVACODOSOFLAW 11 лет назад

    Assets/Weapons/Scripts/Gun.cs(206,50): error CS1061: Type `MouseLook' does not contain a definition for `offsetY' and no extension method `offsetY' of type `MouseLook' could be found (are you missing a using directive or an assembly reference?)
    Do u know what thats about

  • @qligustzur
    @qligustzur 10 лет назад

    When i find the right position to aim the weapon looks terrible when not aiming, please help

  • @pizzatime664
    @pizzatime664 11 лет назад

    Never mind that I figured it out! :D

  • @lukivachtar9007
    @lukivachtar9007 11 лет назад

    Thanks bro... Your tuts help me very much :)

  • @stringy6675
    @stringy6675 11 лет назад

    next part please im useing your help for a exam at school please post more vids on this m8

  • @komandor4543
    @komandor4543 9 лет назад

    I don't know why, but when I'm clicking to play my game, I saw this: All complier errors heve to be fixed before you can enter playmode. What I can do? Can you help me?

  • @WLeop
    @WLeop 8 лет назад

    I can't get the script! Please help. Nothing is working. I downloaded the package, but the script is not there

  • @letsplay8454
    @letsplay8454 11 лет назад

    you are the BEST!
    EVER!

  • @dokan3052
    @dokan3052 9 лет назад

    If you aim down sight, why does the weapon change position back and forth?

  • @KoroProductions
    @KoroProductions 11 лет назад

    When I insert the gun movement script, the weapon always goes off the camera, not the hand or anything but weapon. Tried a million times and still doesnt work

  • @RanjeetKumar-hd5zg
    @RanjeetKumar-hd5zg 9 лет назад

    UnassignedRefenceException: The variable mainCamera of 'Gun' has not been assigned.plz help for that error in TUTORIAL 4.

  • @BADblueRANGER
    @BADblueRANGER 11 лет назад

    try childing the main camera to the gun or the first person controller

  • @disrate
    @disrate 10 лет назад

    This is really outdated. Do you know when it will updated to 4.5?

  • @Lil_Poolfloaty
    @Lil_Poolfloaty 10 лет назад

    i imported the package for download and it messed up my unity and "all compilers must be fixed before entering play mode" i deleted the package and it still doesn't let me play!

  • @pogiman
    @pogiman 10 лет назад

    adfly links are dead can you please fix the links?

  • @TaleOfMigetSquid
    @TaleOfMigetSquid 11 лет назад

    I don't really get it, Is the the default position the aiming down sights bit or is it the gun in the bottom right corner I'm SO CONFUSED

  • @SvodXD
    @SvodXD 8 лет назад

    dude my pc is shit and i cant download the scripts couldnt u just copy/paste it here and then id do the same and make it in Unity??

  • @cjsanders71
    @cjsanders71 11 лет назад

    Awesome tutorial! I do have one problem though. I did everything you said about the aim script but when i move my gun over to change the position, it just stays in the same place. Help?

  • @deadroses8523
    @deadroses8523 9 лет назад

    WTF. ive followed his instructions, but nothing works. the hands/arms are all over the place. the gun doesn't work right, ive looked at his how to shoot video, and there is no shots being fired...... I'm kinda frustrated man....

  • @TaleOfMigetSquid
    @TaleOfMigetSquid 11 лет назад

    My Aiming down sights position means that the gun is in the bottom left corner and when I move it to the right it's not aiming down the sights properly

  • @NarutoUzumaki-yv8mn
    @NarutoUzumaki-yv8mn 9 лет назад

    when i download the assets package and then import it it says Failed to import package with error: Couldn't decompress package. please help

  • @MrSpaetzle
    @MrSpaetzle 11 лет назад

    With which tool are you recording your videos and is it available for windows too ?

    • @alecmarkarian
      @alecmarkarian  11 лет назад

      I'm using screenflow, and it's only available for mac unfortunately.

    • @freddiejohnson9894
      @freddiejohnson9894 9 лет назад +1

      +Markus Benz if you have a GTX 600 series or later, use Shadowplay.

    • @ankitpandit8012
      @ankitpandit8012 9 лет назад

      +Markus Benz you can use action for recording video in windows. it is vey good software. i use it too

    • @notavalible8212
      @notavalible8212 8 лет назад

      +MisterNinjaBoy u can use quicktime too.

    • @nanotheprod
      @nanotheprod 7 лет назад

      intro song?"

  • @TheEric2241
    @TheEric2241 11 лет назад

    it says Assets/Weapons/Scripts/Gun.cs(206,50): error CS1061: Type `MouseLook' does not contain a definition for `offsetY' and no extension method `offsetY' of type `MouseLook' could be found (are you missing a using directive or an assembly reference?)

  • @rasca0027
    @rasca0027 9 лет назад

    My game doesn't even work when I press the play button...
    it's paused forever.
    What happened??!!!!

  • @deepray3667
    @deepray3667 11 лет назад

    you can hide the mouse cursor with a very simple way- Screen.lockCursor = True ;
    Type this in your script attached to the player and it should work good!

  • @thymalo
    @thymalo 7 лет назад

    When I aim down my sight, I can't move my player or look around

  • @mcepix7108
    @mcepix7108 10 лет назад

    My main camera goes lower or the gun goes up when i hit play :(
    I hate when its somthing wrong in programs, cuz i never get replays ;(

  • @GamingOddBox
    @GamingOddBox 10 лет назад

    When I put the hands and gun away from the body to align the ADS the gun and arms move away not into an ADS position? Help?

    • @GamingOddBox
      @GamingOddBox 10 лет назад

      Well the gun keeps on moving to the right not left when ADS?

    • @alecmarkarian
      @alecmarkarian  10 лет назад

      Move on to tutorial 5, where I show an easier and more effective way to ADS. This way actually sucks.

  • @FrostahVFX
    @FrostahVFX 9 лет назад

    "CAN'T ADD SCRIPT --- Please fix compile errors before adding scripts"
    What do i do?

  • @johnlatrasse8230
    @johnlatrasse8230 11 лет назад

    having trouble help plz,
    Assets/Gun.cs(327,32): error CS0246: The type or namespace name `Bullet' could not be found. Are you missing a using directive or an assembly reference?

  • @flintz2895
    @flintz2895 10 лет назад

    hi i'm stuck at this tutorial 4 the link for script can't download ..add fly error ...plz re-upload with with the 1st pack....i'm really bad at scripting

  • @admtoasty3641
    @admtoasty3641 9 лет назад

    assets/AimDownSights.js(21,23): UCE0001: ';' expected. Insert a semicolon at the end. i've tried adding a semicolon at the end and it did nothing on both lines too and still nothing works

  • @crimsonshadow1140
    @crimsonshadow1140 8 лет назад

    the files aren't working it keeps on coming up with errors and it won't work

  • @RaGNArok697
    @RaGNArok697 11 лет назад

    Hey, i did everything you said in the video for the aim down sight but i cant play, any idea why, it just freezes and nothing happens.

  • @minecraftmaster591
    @minecraftmaster591 11 лет назад

    I am having a problemo with gun script:
    Assets/gun script.cs(327,32): error CS0246: The type or namespace name `Bullet' could not be found. Are you missing a using directive or an assembly reference?

  • @adiljawad9
    @adiljawad9 11 лет назад

    I press play and it says that camera not assigned to gun.

  • @TheWizard326
    @TheWizard326 9 лет назад +2

    Could you make a tutorial script on how to put the gun away? And switch to another weapon

    • @xtragamingx2654
      @xtragamingx2654 9 лет назад

      Geuri Troncoso watch his older tutorial like Animation Tutorial for example.

    • @NeonDefense385
      @NeonDefense385 7 лет назад

      It’s called “weapon switch” you don’t need to waste 25 minutes explaining all the goddamn details of what you want

  • @riftiro2845
    @riftiro2845 8 лет назад

    what version of unity did you use?

  • @TheVerbalAxiom
    @TheVerbalAxiom 11 лет назад +5

    Why not explain the code instead of rushing through it? That's what script kiddies do.

    • @XxOwenDevinexX
      @XxOwenDevinexX 11 лет назад +1

      You mean, script kiddies watch this video the copy and paste all the code they see.

    • @TheVerbalAxiom
      @TheVerbalAxiom 10 лет назад

      Obtainable And they also copy and paste code while making videos as well.

  • @Creeperkiller165
    @Creeperkiller165 10 лет назад

    i dont know how to solve this :( help
    1=UnassignedReferenceException: The variable mainCamera of 'Gun' has not been assigned.
    You probably need to assign the mainCamera variable of the Gun script in the inspector.
    Gun.Update () (at Assets/Weapons/Scripts/Gun.cs:141)
    HELP!

  • @amaanmirza9128
    @amaanmirza9128 10 лет назад

    when i add the aim down sight to the hand it says that the script docent exist!!!!!! plz help me ASAP

  • @themercedesguy1330
    @themercedesguy1330 9 лет назад

    I have not been able to get anything but the cursor showing to work since tutorial 1.

  • @marin2684
    @marin2684 9 лет назад

    Dude wtf I cant download any of your links cause when I try to make an account on your webpage it wont accept my emails

  • @muhammadaminkhan9328
    @muhammadaminkhan9328 8 лет назад

    plx mention me the link whom I can download the shooting model that u have used

  • @sendacartoons
    @sendacartoons 11 лет назад

    thank you soooo much i know how to do everything now :D

  • @69dm
    @69dm 11 лет назад

    I dont understand! How I can set iron sight position while aiming?

  • @tiarehowns
    @tiarehowns 10 лет назад

    i am the 10,000 subscriber! rare chance!

  • @AKE2905
    @AKE2905 10 лет назад

    My gun doest fix from the right side to the middle it goes from the left side and when I click to zoom it goes further left, SOMEONE HELP MEEEEEE!!!!

  • @nickjones8974
    @nickjones8974 9 лет назад

    +MisterNinjaBoy: Assets/Weapons/Scripts/Gun.cs(5,14): error CS0101: The namespace `global::' already contains a definition for `Gun'
    I get this error when i try to run my game. please help