#2 FPS Raycast Interactions: Let's Make a First Person Game in Unity!

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

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

  • @NattyGameDev
    @NattyGameDev  2 года назад +313

    Hey Everyone! I have only just realised there is some footage missing from the video!!!
    You may encounter the error "'InputManager.onFoot' is inaccessible due to its protection level".
    if you have this error you just need to change 1 line in the InputManager script.
    Change this -> private PlayerInput.OnFootActions onFoot;
    To this -> public PlayerInput.OnFootActions onFoot;
    Also!! at 21:26 in the AnimateCube script:
    Change this -> startMessage = promptMessage;
    To this -> startPrompt = promptMessage;
    Apologies for the mistake!

    • @TheOnlyK1ng
      @TheOnlyK1ng 2 года назад +2

      no problemo thanks for the fixes!

    • @TheAstrocricket
      @TheAstrocricket 2 года назад

      thanks man!

    • @Astolfo4ever
      @Astolfo4ever 2 года назад +1

      ty very muchoo !

    • @panachedhallchannel1635
      @panachedhallchannel1635 2 года назад +2

      when did we make a door in the last episode?

    • @WhiteKnuckleRide512
      @WhiteKnuckleRide512 2 года назад +4

      @@panachedhallchannel1635 I believe the door and button and cake were made offscreen in between episodes. They are all made (or can be made effectively) out of simple 3d cubes.

  • @shaunfarley7087
    @shaunfarley7087 Год назад +37

    I have watched loads of tutorials to handle interactions, but this is by far the best one. Super clear and easy to understand. Thank you

  • @Elias.Mamoud
    @Elias.Mamoud 2 года назад +68

    Thank you for fueling my dreams on coding and game devolpment!

  • @michaelsullivan2160
    @michaelsullivan2160 Год назад +9

    I appreciate that you take the time to show the process of building the code and explaining what many of the components do in the code. I also like your approach to naming conventions: keep names simple and explicit.

  • @DrummerCAS
    @DrummerCAS 2 года назад +18

    You must have done this for soooo long. Looks so easy when yo do it. Thanks for this series. Nice to see some advanced stuff (at least it seems so for a noob like me) and you still find time to explain most of it. keep it coming, subbed and ready!

  • @HoisinDuckWrap
    @HoisinDuckWrap 2 года назад +12

    WOW! Thank you - you posted this on my birthday lol. Awesome video!

    • @NattyGameDev
      @NattyGameDev  2 года назад +9

      Hahah Happy Birthday! I really hope you enjoyed the cake !!🎂🎂 thank you so much for watching and have an awesome day !! 🙂

    • @armando_gamer1929
      @armando_gamer1929 9 месяцев назад

      Happy birthday bro

    • @pranavajay5528
      @pranavajay5528 8 месяцев назад

      it was 2 years ago @@armando_gamer1929 💀💀

  • @Dibs4323
    @Dibs4323 2 года назад +21

    of all the tutorials I have been searching so far this works for me and I thank you, keep up the good work :)

  • @boomy1
    @boomy1 2 года назад +15

    Thank you so much man! It's insane how much I learn from you! Really looking forward to more videos like these!

    • @durumvfx
      @durumvfx 2 года назад +1

      Hva satan boomy laver du spil? Du burde da sidde på fv og trolle XD

    • @boomy1
      @boomy1 2 года назад +2

      @@durumvfx Yea haha, går på skole med programmering og spiludvikling så det altid dejligt at lære noget nyt :D

    • @durumvfx
      @durumvfx 2 года назад +1

      @@boomy1 Det lyder da lækkert, håber det går godt med den der skole ;)

  • @donaldfaulknor2149
    @donaldfaulknor2149 Год назад +1

    I love watching tutorials. I've taken MANY courses, including the Junior Programmer Pathway. But, every time I take a tutorial, I learn something the courses didn't teach (or at least something I don't remember), such as the Interactable script and how it acts as a template. This can greatly improve the way I develop games.

  • @aryasantosh2528
    @aryasantosh2528 Год назад +38

    Natty can you please add a tutorial for the setup of the scene. It would be much appreciated.

    • @ripethics5422
      @ripethics5422 Год назад +7

      agree

    • @mathlab6168
      @mathlab6168 Год назад +2

      I am new and this is my first project and I have no clue of how he created the scene. It would be great if there was a tutorial for the scene

    • @nathanbatten
      @nathanbatten Год назад +2

      @@mathlab6168 Same with me, I spent an hour just playing around, just make 3d blocks, adjust the positions and scale options to make walls a door and a small block for the button

    • @prajanyashrestha3652
      @prajanyashrestha3652 8 месяцев назад

      did anyone found out how to setup the scene??

    • @abdelilahbakouri942
      @abdelilahbakouri942 8 месяцев назад

      @@prajanyashrestha3652 It's just a bunch of cubes that are scaled. Not that hard to make ;)

  • @Whitewolfgaming
    @Whitewolfgaming 2 года назад +8

    these have been the best working tutorials for me in awhile i appreciate you taking the time and effort for these

  • @polyhedrainteractive9663
    @polyhedrainteractive9663 Год назад +4

    Hey natty,
    Really love your videos!
    I have been looking for an easy tutorial for month and finally found one
    Keep it up :)

  • @mohammed.f5607
    @mohammed.f5607 2 года назад +2

    I have been waiting for you to upload , thank you.

  • @Squishen
    @Squishen Год назад +18

    to the people confused about the keypad and doors: they are made out of simple shapes. go into your hierarchy and add 3d object>cube, then transform each cube into the correct shapes.

  • @TheOnlyK1ng
    @TheOnlyK1ng 2 года назад +3

    Thanks for making this amazing tutorial. I really think your channel will blow up soon! :)

  • @RockSoldier86
    @RockSoldier86 2 года назад +1

    yoooo, this part is much better then previous one, thank you for this tutorial))

  • @_movie_clippers
    @_movie_clippers 2 года назад +1

    yess the sequal came i loved the first one and cant wait to use this guide

  • @zerotohero0007
    @zerotohero0007 2 года назад +3

    I really love your tutorials, dude !
    (Waiting for new parts)

  • @chanrachael4628
    @chanrachael4628 2 года назад +4

    Thank you for the great tutorial!

  • @felipesuarez4820
    @felipesuarez4820 2 месяца назад

    Wow, you learn a lot watching and paying attention.

  • @GaryParkin
    @GaryParkin Год назад

    Thank you. This is going to be a good series. I like tutorials that make me think.

  • @Sudgy
    @Sudgy 2 года назад +1

    Good stuff man, looking forward to following along with this series.

  • @calvinms7503
    @calvinms7503 Год назад +1

    Thank you. You are an excellent teacher

  • @rca6798
    @rca6798 2 года назад +21

    Great tutorial but unfortunately I am stuck on 15:58, because there's a error popping up saying that "'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)". I'm completely new with Unity so please can you help me on how to solve this problem?

    • @NattyGameDev
      @NattyGameDev  2 года назад +14

      So I believe you will need to change the private Onfoot variable to public (in input manager). And make sure the names match in both scripts...

    • @rca6798
      @rca6798 2 года назад +1

      @@NattyGameDev Thank you so much I don't think I would of ever figured that out everything works now how it should👍

    • @EmberGlide
      @EmberGlide 2 года назад +1

      @@NattyGameDev i still have problems
      with this part :(

    • @EmberGlide
      @EmberGlide 2 года назад

      Assets/Scripts/Player/PlayerInteract.cs(36,34): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)

    • @ccbb2210
      @ccbb2210 2 года назад +12

      @@EmberGlide i found that after like the second time making the o inputManager.OnFoot lowercase instead worked as inputManager.onFoot

  • @ski_kid
    @ski_kid 5 месяцев назад

    i have watched the first ep from the beginning i wanted to change from different vids so i can make my own game but i dont need to bc he gives all the info thanks man

  • @nftbasel2992
    @nftbasel2992 2 года назад +3

    Yesss been waiting for this

  • @chatabluehawk7149
    @chatabluehawk7149 2 года назад +46

    Is it just me or at 16:54 the lines of code
    doorOpen = !doorOpen;
    door.GetComponent().SetBool("IsOpen", doorOpen);
    appear out of nowhere,

    • @NattyGameDev
      @NattyGameDev  2 года назад +34

      Hah! wow.. Good pickup! yes they do come out of nowhere, it seems there was an editing error.
      we talk about and implement these lines at 20:14
      Apologies for the confusion! I had to crunch a bit to get this video out and I completely missed that!

    • @chatabluehawk7149
      @chatabluehawk7149 2 года назад +6

      Dang I did not expect a reply that fast, thanks!

    • @spikef1114
      @spikef1114 Год назад

      no it did

    • @rjhubbabubba3019
      @rjhubbabubba3019 Год назад

      yeah i saw that too! I was about to add it but then a bit later its back to normal! I was so confused 🤣

    • @Anonymous-y8l3s
      @Anonymous-y8l3s Год назад

      I was confused too

  • @anddev1
    @anddev1 Год назад

    the best one so far, bravo!!

  • @NeverEnoughTurbo
    @NeverEnoughTurbo Год назад +8

    16:54
    Is it just me or did the lines
    private GameObject door;
    private bool doorOpen;
    and
    doorOpen = !doorOpen;
    door.GetComponent().SetBool("IsOpen", doorOpen);
    come from nowhere

  • @teddid1820
    @teddid1820 2 года назад +1

    Really Good Tutorial Thank you dude

  • @ahmedmagdy796
    @ahmedmagdy796 Год назад +11

    Thank you so much for this wonderful tutorial, its really great but in the first tutorial you stopped at the crouch and sprint codes, and now you have built two rooms with doors and I don’t know how to do them so is there any other video in which you explained how to do them?

    • @dianevoidless2643
      @dianevoidless2643 8 месяцев назад

      in the last tutorial, the video showed us the script snippets that u needed to add, and in what .cs file each snippet went in, including line references. It also showed the additional player input actions needed to be added for sprinting and crouching.
      regarding this video, to make a scene such as the one he created, u need to add cubes to your scene, and manipulate their size and position in space. Like this, you can get rectangles of any size. As for the cake that he added, well, he probably made that in Blender or something. However I, for example, created a sphere and distorted it so that it resembles a coin, since i have no means of making something more complex, unless i picked up 3d sculpting or looked for a 3d model online.
      Hope this helps!

  • @animetarter
    @animetarter Год назад +15

    I know I am late to this party but, if anyone stumbles across this and is worried about interacting with interactables through things like walls - On the 'Player Interact' Script, under distance is mask - Set this 'Default, Intractable' (select both Default and Interactable)

    • @starplatinum3305
      @starplatinum3305 Год назад +2

      thank you, i was dying while reading those documents T_T

    • @warichkanchai9434
      @warichkanchai9434 Год назад

      lifesaver

    • @Anonymous-y8l3s
      @Anonymous-y8l3s Год назад

      Thanks

    • @nokipoika
      @nokipoika 3 месяца назад

      If anyone is confused about what they said about setting Default, Interactable. It's not in the actual script, rather it's in the player game object which has the script added to the inspector, there are fields where you can choose which layer mask you want the ray to have any interaction with. There you can click beside the mask and in the drop-down menu, click on default too. It's not mutually exclusive, you can add any amount of layer masks and remove them by clicking again.
      The problem is by default it won't interact with anything that's not using the Interactable layer, which includes the walls. But since you don't want the walls to be interactable, you add Default layer mask, which has no written code for in the scripts we made.

    • @nokipoika
      @nokipoika 3 месяца назад

      @@black_squall It, stops interactions through walls. If anyone is confused about what they said about setting Default, Interactable. It's not in the actual script, rather it's in the player game object which has the script added to the inspector, there are fields where you can choose which layer mask you want the ray to have any interaction with. There you can click beside the mask and in the drop-down menu, click on default too. It's not mutually exclusive, you can add any amount of layer masks and remove them by clicking again.
      The problem is by default it won't interact with anything that's not using the Interactable layer, which includes the walls. But since you don't want the walls to be interactable, you add Default layer mask, which has no written code for in the scripts we made.

  • @panderz_gg
    @panderz_gg 2 года назад +5

    Looking forward to part 3 mate :)

    • @NattyGameDev
      @NattyGameDev  2 года назад +6

      Part 3 out now! :D ruclips.net/video/_UIiwzfZoZA/видео.html

  • @diliupg
    @diliupg Год назад

    Thanks for this great series!

  • @DieterSoost
    @DieterSoost Год назад +1

    This video series is a really great achievement ! Thank you for your time and effort ! I know how difficult this work is... - btw: works with UNITY 2022.3 👍

  • @CitifiedBow225
    @CitifiedBow225 2 года назад +4

    id love a tutorial on how to set up the world space prompts!

  • @glitchagon09
    @glitchagon09 Год назад +8

    I know it's late but I had a few errors popping up(like the ones the other comments are complaining of) and fixed it by deleting the copied files in the project. When I moved the files to the Player folder, it duplicated. Just go to Scripts folder and delete the player files. That's it. Tell me if it worked :) thx
    Edit: And if it still doesnt work, then save the script, open the script again from unity and check if its the same. usually it won't because the one i was working on was the cloned one. so just refresh and then check if the script is the same 🙂

    • @JoshwaLaw
      @JoshwaLaw 7 месяцев назад

      oh thank god for you lol i ended up just moving everything back out of player folder and deleting the folder, because it kept saving a new copy of the script in either of the two places and it was a disaster lol thanks so much!

  • @drguillotine7485
    @drguillotine7485 10 месяцев назад

    Holy Moly thank you this was awesome hope you do an Inventory System Tut in the future one of the best examples of how to Code in C# for unity

  • @CB66941
    @CB66941 Месяц назад +2

    At 11:18, Nat right clicks to copy, but that submenu doesn't even pop up for me when I right click. Anyone else having a similar issue? I tried to ctrl-c and ctrl-v it but it only works in the same inputaction window, not a different one.

    • @icerx2140
      @icerx2140 15 дней назад

      same, have you found a fix to it?

    • @CB66941
      @CB66941 15 дней назад

      @icerx2140 the only fix I got was to get the latest version of unity. Unity 6 I think

    • @icerx2140
      @icerx2140 15 дней назад

      @@CB66941 i just did the same thing without moving the inputs , it still worked

  • @MichaelVanDelft
    @MichaelVanDelft 2 года назад +1

    Thank you so much you've been a big help

  • @lachcik5084
    @lachcik5084 2 года назад +53

    so when did we make these two rooms? im confused

    • @Varomic
      @Varomic 2 года назад +5

      @Clio Then how are we supposed to make the UI properties

    • @swiftypopty1102
      @swiftypopty1102 Год назад +2

      @Clio I'm kinda confused

    • @torbenkramm2725
      @torbenkramm2725 Год назад +2

      @@swiftypopty1102 why?

    • @gh-jb3ud
      @gh-jb3ud Год назад +1

      Did you figure out how to make the scene? lol

    • @Random_Porgies
      @Random_Porgies 10 месяцев назад

      How?!

  • @funnythings1283
    @funnythings1283 2 года назад +2

    you are the best, and plZ upload fast

  • @notunrealyt2261
    @notunrealyt2261 Год назад +5

    is there a part in this video where you show us how to make the walls, keypad and cake stand?

  • @daxvapik
    @daxvapik 2 года назад +1

    Thanks. Keep it up !

  • @mdszirgun8715
    @mdszirgun8715 Год назад +2

    hi, first of all i really loved the first lesson! thank you very much! but it feels like the second lesson skipped the build up for the set up making it a bit hard to follow throu. thanks in advence

  • @kandy5129
    @kandy5129 Год назад +4

    Is there a way to stop the raycast from going through the wall in order to lock the door behind the player?

  • @BigC1710
    @BigC1710 Год назад +6

    This is an amazing tutorial series and I'm loving it but I'm having a slight problem with my 'Interactable' script my error message says "Assets\Scripts\Player\PlayerInteract.cs(34,50): error CS1061: 'Interactable' does not contain a definition for 'promptMessage' and no accessible extension method 'promptMessage' accepting a first argument of type 'Interactable' could be found (are you missing a using directive or an assembly reference?)" could you please help me

    • @norealforsake
      @norealforsake Год назад

      How did you fix it pleas tell me

    • @mohammednajar6981
      @mohammednajar6981 Год назад

      i have the same probleme any idea how to fix this?

    • @mohammednajar6981
      @mohammednajar6981 Год назад

      did you find a solution@@norealforsake

    • @mrjryan44
      @mrjryan44 8 месяцев назад

      my issue was a typo in the variable definition

  • @mrjryan44
    @mrjryan44 8 месяцев назад +1

    If the canvas is in your way in the scene and you keep clicking on it, just click the eyeball next to canvas in your hierarchy

  • @aleksasevic4020
    @aleksasevic4020 2 года назад +11

    Awesome video series man, really insightful! How often do you plan to upload these?

    • @NattyGameDev
      @NattyGameDev  2 года назад +10

      Thanks very much! I really appreciate it :) I am going to try upload more often over the coming months, I have a number of videos planned!

    • @0x3C
      @0x3C 2 года назад

      @@NattyGameDev I'm curious what topics you're going to cover, do you mind sharing a breakdown? I'm very interested!

  • @tommyvanwoerkom5411
    @tommyvanwoerkom5411 2 года назад +9

    awesome video btw but up until around 17 minutes into the video I keep getting this error:
    "Assets/Scripts/Player Scripts/PlayerInteract.cs(35,34): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)"
    Ive triple checked all of my scripts and cannot figure out the problem. Anyone know what wrong?

    • @NattyGameDev
      @NattyGameDev  2 года назад +3

      try delete the PlayerInput.cs file and regenerate it.. I have found that if you edit your action map after you have generated the script.. then you will need to delete it and regenerate it :)

    • @tommyvanwoerkom5411
      @tommyvanwoerkom5411 2 года назад

      @@NattyGameDev ok tsym. Surprised on how fast you replied :)

    • @tommyvanwoerkom5411
      @tommyvanwoerkom5411 2 года назад

      sorry to bother you again but ive tried regenerating it and I still have the same problem.

    • @TheDestructiveNinja
      @TheDestructiveNinja 2 года назад

      @@tommyvanwoerkom5411 I'm having the same issue. I'm currently comparing!

    • @TheDestructiveNinja
      @TheDestructiveNinja 2 года назад +13

      @@tommyvanwoerkom5411 I wanted to paste his reply that helped fix this issue:
      "So the way to fix the onfoot error is to make the property public in the InputManager script. public PlayerInput.OnFootActions onFoot;
      and most likely because intellisense didn't pop up.. on line __ in playerinteract change OnFoot to onFoot"

  • @homemadeswtor
    @homemadeswtor 10 месяцев назад

    im in 2024, this still works great!

  • @QubitGuy-579
    @QubitGuy-579 6 месяцев назад +1

    Bro is this the 2nd vid of this series or any other there like 1.5?
    Bcoz in the first vid there waas only a platform but now there is an entire room with cake!

  • @khurum
    @khurum Год назад

    this helped me a lot thanks

  • @Mali-Man11
    @Mali-Man11 7 месяцев назад

    Thanks man and btw for animating cube I used the code from Keypad and copied it and I made 2 clips just like in the video and for the changing color I used events.

  • @NedranMusic
    @NedranMusic 6 месяцев назад

    Hey! Quick question, my Player is a prefab who is not by default in the world (I'm making a multiplayer game so the player only spawns when I join the server); because it's a prefab I can't assign the PromptText to him in the inspector (it says "Type mismatch"), how can I move around this? Thanks!

  • @pzys-_-823
    @pzys-_-823 2 года назад +9

    Hi ive been waiting for this! Nice Quality Video man. But i have a Problem. I dont get any Errors but when i interact with the keypad it doesnt play the animation. so i tried doing a debug.log to check if its even getting the input, and yes the input works but the animation just doesnt play :/

    • @NattyGameDev
      @NattyGameDev  2 года назад +6

      Hey, how have you gone with this?
      Does the animation work when you manually set the boolean in the animator window like in the video?
      I believe it may be something odd in the animator, or with the boolean values you're passing through to there :)

    • @TheOnlyK1ng
      @TheOnlyK1ng 2 года назад +5

      srry im late but, try checking if the parameter name of the animation (in the animator on the left) has the EXACT same spelling as the one refrenced in the script.

    • @lukacolic6081
      @lukacolic6081 2 года назад

      @@TheOnlyK1ng thank you man you dont know how much u help me now!!!!!!

    • @ImaNOOB0915
      @ImaNOOB0915 Год назад

      @@NattyGameDevcan u show us how the door?

  • @Killerkraft975
    @Killerkraft975 9 месяцев назад

    i had a problem at 13:40 with PlayerUI giving the error message of 'Object Reference Not Set to an Instance of an Object'. If any of you have this problem, make sure you set the playerUI public, do not set the component but pass the component with the PlayerUI to it.
    Thanks for the tutorial though!

  • @TheRealTheLights
    @TheRealTheLights Год назад +1

    inputManager does not contain a definition for OnFoot
    (line 35 for you)

    • @youtubesucks5131
      @youtubesucks5131 Год назад

      same issue here. maybe because in the inputmanager, the onfoot variable is set to private, not sure though

  • @crissutaun
    @crissutaun Год назад +2

    im getting an error which says "Assets\Scripts\Player\PlayerInteract.cs(36,34): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)" it happens when i try to interact with the keypad at 17:02

    • @peterfarago7727
      @peterfarago7727 10 месяцев назад

      I FOUND THE SOLUTION ON THIS:
      Assets\Scripts\Player\PlayerInteract.cs(36,34): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)
      In the PlayerInteract script the 36th line you have to change OnFoot --> onFoot. It is wrong in the video , dont use capital letter. Just simple onFoot. The right line is: " if (inputManager.onFoot.Interact.triggered) "

    • @crissutaun
      @crissutaun 10 месяцев назад

      @@peterfarago7727 yeah i found out about it in the discord server that the creator has

  • @kittennuggets101
    @kittennuggets101 2 года назад +3

    where the heck was this map[ made in the series? im dumb and don't know anything aobout coding i watched the first tutorial and it was really hard and now im expected to know how ot model a cake??? and a door??????

  • @Mimingaaaa
    @Mimingaaaa Год назад +2

    Thank you for wonderful tutorial. It is awesome that I can take this lesson for free.
    By the way, I am wondering how long will it take to be able to do this by myself. I am totally a begginer and found it very complexed.

  • @nelsonthekinger
    @nelsonthekinger Год назад

    terrific job Natty Gamedev!

  • @Panda-ii5tr
    @Panda-ii5tr 2 года назад +4

    great vid, around 17 minutes in, I get an error
    Assets\Scripts\Player\PlayerInteract.cs(36,33): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)
    idk how to fix this, please help me

    • @vhaz7831
      @vhaz7831 2 года назад

      i believe he addressed that in the comments

    • @peterfarago7727
      @peterfarago7727 10 месяцев назад +1

      I FOUND THE SOLUTION ON THIS:
      Assets\Scripts\Player\PlayerInteract.cs(36,34): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)
      In the PlayerInteract script the 36th line you have to change OnFoot --> onFoot. It is wrong in the video , dont use capital letter. Just simple onFoot. The right line is: " if (inputManager.onFoot.Interact.triggered) "

    • @Teethremoved31
      @Teethremoved31 26 дней назад

      @@peterfarago7727 thanks! i was trying to fix this for 2 hours

  • @dieferstudiosdiego9337
    @dieferstudiosdiego9337 8 месяцев назад +1

    there is a way to stop the ray crossing throw walls?, i dont want to interact with the keybord form the other side of the wall

  • @aa301875
    @aa301875 2 года назад +3

    Nice vid man !!!! I'm a unity noob at want to learn making a FPS game.

    • @NattyGameDev
      @NattyGameDev  2 года назад

      That's Awesome! You can do it! :D

  • @stevensheng7
    @stevensheng7 2 года назад +3

    for the CollectCube at 21:25 i added a new script at Interactable folder, but the Interact() is wrong and it said no suitable method found to override

  • @deepwokengirlnatalie
    @deepwokengirlnatalie Год назад +2

    3:13
    stopping here to go sleep

  • @rissoiscruos
    @rissoiscruos 9 месяцев назад +1

    Hello I have this error Assets\Scripts\Player\PlayerInteract.cs(35,34): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)
    in this part of the video 16:49 I would love if someone could help me.

    • @xman-xk7nt
      @xman-xk7nt 9 месяцев назад

      Do onFoot not Onfoot it worked for me

  • @powaldsd
    @powaldsd 2 года назад +3

    Hey, Awesome tutorial but I have a problem at 18:40 my animation didn't get smooth. I tried making another keyframe but then my animation got stuck from switching to open and closed state. When I didn't try to smooth my animations they were normal, but when i add another keyframe everything brokes.

    • @JesseOghre-z8u
      @JesseOghre-z8u Год назад

      me too

    • @Hemming_Estorsky
      @Hemming_Estorsky Год назад

      If you mean that it's closing rapidly, then you need the third animation clip.
      Its firs keyframe should contain transform values from the opened animation and the second keyframe - from closed.
      Then put it on the transition from opened to closed.
      Hope that helps :)

  • @itsnathanhogg1199
    @itsnathanhogg1199 8 месяцев назад +2

    Good Afternoon,
    I am receiving the following error message, even though my code is the exact same as yours: Assets/Scripts/Player/PlayerInteract.cs(39,34): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)
    Any idea what is happening?
    Thanks

    • @pizzakudden
      @pizzakudden 8 месяцев назад

      Check his comment!

    • @JGCD21
      @JGCD21 8 месяцев назад +1

      In InputManager.cs
      Change this -> private PlayerInput.OnFootActions onFoot;
      To this -> public PlayerInput.OnFootActions onFoot;

    • @AphoRot
      @AphoRot 6 месяцев назад +2

      Hey mate I had this same issue. I had to change it to if (inputManager.onFoot.Interact.triggered)
      He has it set as lowercase in the InputManagaer.cs, so just make the "o" lowercase and you should be good

    • @FreakoNek
      @FreakoNek 6 месяцев назад +1

      are you writing a comment or an envelope sent by pigeon

    • @BeingHasnain
      @BeingHasnain 2 месяца назад

      @@AphoRot thanks mate.

  • @maydaytheprotogen
    @maydaytheprotogen 5 месяцев назад

    12:39 just a time stamp for me when i get back lol

  • @orvobx7909
    @orvobx7909 2 года назад +2

    really love the tutorials. I had some issues like accidental duplications of a couple scripts and not having certain things public which i found the answer to in your comment on here. I do want to know, how do you make your character start out not looking at the ground? this has been a common issue throughout my time trying to find a good character controller

    • @Milkteasoda
      @Milkteasoda 2 года назад

      Dude I have the same problem I watch that part 3 times and I still can't find what's wrong

    • @davo4074
      @davo4074 2 года назад

      same as lads

    • @lucasgruntjes3514
      @lucasgruntjes3514 Год назад

      So i had the same problem, and after looking in some of the older Discord posts I found out it was caused by moving the PlayerInteract script into player folder. For some reason Unity duplicated the PlayerInteract script when moving this script.
      to solve the issue, make sure there is no duplicate of the 'PlayerInteract' script (look in the 'scripts' folder + the newly created 'Player' folder and delete either of the files), what might help is closing VisualStudio code before deleting or moving any scripts.

  • @fenbaff3549
    @fenbaff3549 2 года назад +8

    Hi Natty i love how you explain things but i missed how you made the rooms and cake can you walk us through

    • @TornadoPro2712
      @TornadoPro2712 2 года назад

      ikr, i was so confused

    • @SonnyDays1
      @SonnyDays1 2 года назад +2

      I know its late but what I did is I used 3d cubes to make walls and changing their X , Y, Z scales in each cubes transfrom . I also changed the colors of the walls by creating a new material.

    • @swiftypopty1102
      @swiftypopty1102 Год назад

      I'm surprised he didn't show that, I'm also very confused too.

    • @HugeHippo
      @HugeHippo Год назад

      @@swiftypopty1102 its just some simple cubes :)

    • @gh-jb3ud
      @gh-jb3ud Год назад

      ​@@HugeHippohow did you make the wall with the door?

  • @bigboy4432
    @bigboy4432 10 месяцев назад

    you are legend thanks

  • @simonemartin-pn9zi
    @simonemartin-pn9zi 5 месяцев назад

    the cake is not a lie🎉🎉

  • @thebizarian
    @thebizarian 2 года назад +4

    Really appreciate the video as its exactly what I needed for something I am doing for a school project, but I am getting an error in the "Player Interact" script. It says the "InputManager" could not be found. I did stuff fairly similar as instructed throughout the video, but I cannot seem to fix it. Any help from anyone would be appreciated!
    [Here's exactly what Unity said: Assets\Assets\Scripts\Player\PlayerInteract.cs(13,13): error CS0246: The type or namespace name 'InputManager' could not be found (are you missing a using directive or an assembly reference?)]

    • @NattyGameDev
      @NattyGameDev  2 года назад +1

      Jump on the discord and post a screenshot of the code and we should be able to figure it out :)

    • @r0gue278
      @r0gue278 2 года назад

      Were you able to find out because I’m having the same problem

    • @thebizarian
      @thebizarian 2 года назад

      @@r0gue278 Natty helped. We were able to get it to work, but it wasn’t accepting inputs near the end and I just took a break. Just join the discord and ask for help and explain your problem in the “coding help” channel. A lot of people in the server are very helpful.

    • @r0gue278
      @r0gue278 2 года назад +1

      @@thebizarian I found out that I had to put onFoot instead of OnFoot in the raycast

    • @thebizarian
      @thebizarian 2 года назад

      @@r0gue278 Ah, yep. Casing definitely sucks

  • @haveafuntime
    @haveafuntime Год назад +1

    please could you describe what you're doing, I'm new to unity, please?

  • @gyrostat5211
    @gyrostat5211 2 года назад

    very helpful thank euuu

  • @NeverEnoughTurbo
    @NeverEnoughTurbo Год назад +2

    when I interact with the keypad, it's giving an error :
    Object reference not set to an instance of an object
    In Keypad, line no. 25

    • @crypse.
      @crypse. 4 месяца назад

      do you rememver how you fixed it?

  • @2EZShadow
    @2EZShadow Год назад +1

    I got stuck at 16:27.
    I get and error on PlayerInteract.cs saying:
    "Error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extention method 'OnFoot' accepting a first argument of type 'Input Manager' could be found"

    • @acidandbile6335
      @acidandbile6335 Год назад

      Same. Have you found a solution?

    • @beepboop8446
      @beepboop8446 Год назад

      hey man, I also have the same problem. I checked his pinned comment and thought that might help but I am still getting the same message. I'm not sure what were doing wrong here lol.
      edit:
      oh, I think I found out what had gone wrong. I followed his pinned comment and changed onFoot from private to public. Then I changed the name OnFoot to onFoot on the PlayerInteract script.

  • @spunkin49
    @spunkin49 Год назад +1

    where am i supposed to plug that code into from the end of the video?

  • @CrisA-h2p
    @CrisA-h2p Год назад

    Hi! I am a blocked after the first video, because I don't know how to make that walls😂. I am really new to unity, and this is the first tutorial that worked from the beginning to the end).

    • @l_a__z_y
      @l_a__z_y Год назад

      привет, ты уже разобрался? У меня точно такая же проблема...

    • @ColdPeasDev1
      @ColdPeasDev1 4 месяца назад

      @@l_a__z_y I know this is super late, but have you tried setting up a collider component? you can access them through the physics tab of components.

  • @qeditsss
    @qeditsss Год назад +2

    After importing the UI into player input, I keep getting an error saying type or namespace definition, or end of file expected. Does anyone know a fix please?

  • @samuel6816
    @samuel6816 2 года назад +2

    Awesome video, grest tutorials, bring more interactions and transitions (gameplay, freeze controls, play anim, bring controls and gameplay). and what the name of it to I search, please. peace bro

  • @collosalcake236
    @collosalcake236 2 года назад +3

    I'm getting the error " "InputManager" does not contain a definition for "OnFoot" and no accessible extension method "OnFoot" accepting a first arguement of type "InputManager" could be found" is there any way I can fix this?
    Edit: Nevermind, I LEGIT JUST HAD TO CHANGE "on" to "On". 🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️

    • @manyk6971
      @manyk6971 3 месяца назад

      yo howd you fix it ive changed the onFoot to OnFoot and it stil wont work

    • @collosalcake236
      @collosalcake236 3 месяца назад

      @@manyk6971 sorry i forgot i looked at this tutorial 2 years ago. just try look at the error messages and search them up. also think of the logic in your code too

  • @devroma6205
    @devroma6205 2 года назад +1

    hey i need help at around 7 minutes into the vid, it says interactable does not have a definition for promptMessage or smthn

  • @PilotInspektor
    @PilotInspektor 2 года назад +1

    Thanks for tutorials, but i have question: why you dont use [SerializeField] for setupable public fields and change public to private when they dosnt used in other objects? And imo u can use this [SerializeField] on PlayerInteract field in PlayerInteract and dragndrop main camera in player to this script? Thanks for answer!

    • @beqadolidze4539
      @beqadolidze4539 2 года назад +1

      hey you look like you know scripting, i got error when he finnishes script 14:24 , error says PlayerUI does not contain a definiton for UpdateText

    • @acidandbile6335
      @acidandbile6335 Год назад

      @@beqadolidze4539 I'm having the same issue. Did you ever manage to fix it?

  • @iamabigbrain
    @iamabigbrain Год назад +2

    Assets\Scripts\PlayerInteract.cs(11,12): error CS0246: The type or namespace name 'InputManager' could not be found (are you missing a using directive or an assembly reference?)

    • @Phant0mOne-yd7ty
      @Phant0mOne-yd7ty 6 месяцев назад

      check if the starting part of ur script is
      public class InputManager : MonoBehaviour
      it will be different if u renamed ur script in unity for example if u changed it to input the code wont change to
      public class input : MonoBehaviour it will stay as it was previousley named i had this same error hope it helps

  • @jh1an394
    @jh1an394 2 года назад +2

    Assets\Scripts\Player\PlayerInteract.cs(30,47): error CS0246: The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?) PLEASE HELP

    • @catman7474
      @catman7474 2 года назад

      you might have named it somethin else

    • @YorichoNikosi
      @YorichoNikosi 2 года назад +1

      "I" change to "i"

    • @official_fishy_games7360
      @official_fishy_games7360 Год назад

      did you fix this i have the same issue

    • @Pollin970
      @Pollin970 Год назад

      Have you made sure that the "Interactable" script actually says "public abstract class Interactable : MonoBehavior"? I had to rename my script in unity after accidentally hitting enter before I could name it Interactable. Its important to note that if you rename a script in Unity, you will have to rename the script Inside its code aswell.

  • @thwjk
    @thwjk 2 года назад +1

    Man in 14:20, my Unity saying 3 error's:
    Assets\Scripts\PlayerInteract.cs(5,14): error CS0101: The namespace '' already contains a definition for 'PlayerInteract'
    Assets\Scripts\PlayerInteract.cs(16,10): error CS0111: Type 'PlayerInteract' already defines a member called 'Start' with the same parameter types
    Assets\Scripts\PlayerInteract.cs(23,10): error CS0111: Type 'PlayerInteract' already defines a member called 'Update' with the same parameter types

    • @NattyGameDev
      @NattyGameDev  2 года назад +1

      Delete the second Player interact script in your project.

    • @thwjk
      @thwjk 2 года назад

      @@NattyGameDev thx man! Continue your videos! It's the best tutorial

    • @NathanAke000
      @NathanAke000 2 года назад

      what second player interact script?

  • @maestrohulk746
    @maestrohulk746 Год назад +1

    @Natty GameDev hi, i did the opening door thing, but i dont have to press the e key instead if u just look at it it opens and closes over and over again, do you know how to fix this?

  • @Tonedriver
    @Tonedriver 6 месяцев назад

    I’m having trouble trying to set up two or more of these initial Boolean animation interactables taught in the video, with two separate doors and a chain of switches that rise from inside my arena’s platforms, one opening up to the next.
    I can’t seem to use only one Switch script, because if I try to abandon including the particular objects that I don’t want changed from only one switch, by not inserting the objects into the script component fields, it doesn’t let me enter play, and more or less said that I needed to include the missing objects in the field.
    When I enter all objects into the fields, and apply this one master script to, for example, 2 separate switches, the first I intend to have, “close door 1, lower switch 1, raise switch 2”, and the second I intend to have, “raise switch 1, lower switch 2, open door 2”, it makes it work to where I have to double-click to seemingly activate, and switch 1 involves the unintended door 2 as well as intended door 1, while the same happens for switch 2 as I just mentioned for switch 1(unintended additional inclusion of door 1).
    So I’ve tried to separate the switch animations across 2 different script components, so as to attempt to force switch 1 to not involve door 2, and force switch 2 to not involve door 1. What happened, however, is that I got an error type CS0115: “No suitable method found to override”. It occurs for each of the two separate scripts, and directs me to the scripts’ lines and characters that start the word “override” in my “protected override void Interact()” function(?).
    I looked up online, and found commonly that people were able to clear their similar error prompts by just removing “override” in their function line, so I did the same, and it did clear it up, but now within the Unity editor, in my switch object inspector script components, it shows that I no longer have a field for Prompt Message, where you had us write our specific message of, “Use Keypad”, or for my instance, “Use Switch 1/ Use Switch 2”. Also, when I enter play, naturally, the switch 1 no longer prompts my “Use Switch 1 message, and it also doesn’t affect any three of my intended animations, across door 1(close), switch 1(lower), and switch 2(raise).
    I’m left assuming that having two separate booleans coming from two separate scripts, trying to manipulate one object, such as in my case, having both switch objects attempting to raise and lower one another, causes a problem, where perhaps either an prior or default offset position of a switch that the other needs to work is not positioned.
    I know that there is that Boolean parameter check box field that maybe can be used to initiate registry for the other object’s scripted position, so I’ll try that, but if it doesn’t work, then I hope to get some help with this.
    I’m really curious and actually have my heart a little set on trying to make use of just this one type of Boolean animation interaction, because I have a plan to create a large and high arena room to make a game out of searching for newly surfaced switches that emerge from the platforms, where with the range of raycast reception controlled by the size of switch object to size of platform, a desired inaccessibility of unsurfaced switch can retain the flow of the gameplay’s challenge, in plan to include all the while frequent and dangerous enemy spawns to keep pressure on the search for switches, for the end goal of opening the door 2 to an elevator lift that proceeds to the next level(scene?).
    Anyway, thanks for what video content has helped so far, and again it would be really cool if I can snag some late help in this series’ lifecycle. I’m writing this as of May 25, 2024.

  • @Anakin.Skywalker44
    @Anakin.Skywalker44 Год назад +1

    how do you get all those suggestions for what to put in ? please help i think it would make it alot easier to follow the tutorial and not have to pause all the time, Thanks !

  • @mathlab6168
    @mathlab6168 4 месяца назад +1

    Hey there I was stuck on this animating door thing because when I first tried it I messed up on a step but now I don't know how to fix it and the door won't open

    • @mathlab6168
      @mathlab6168 4 месяца назад

      When I try to animate it and move it to the right it doesn't actually record those keys

    • @Xavier-fy9jw
      @Xavier-fy9jw 7 дней назад

      @@mathlab6168 have you found a solution yet, I need help with this aswell

  • @kuinkyo7292
    @kuinkyo7292 Год назад +2

    Hey I’m having an issue, I’m at around 7:36 and even though I’ve made the Intractable layer I’m still getting an error that says The type or namespace name ‘Intractable’ could not be found , does anyone know how to fix this???

    • @abdurehman
      @abdurehman 10 месяцев назад

      Hey did you find any fix for it?

    • @ti-loup3999
      @ti-loup3999 3 месяца назад

      @@abdurehmanhaii It's old now but make sure that in your interactable script you have public string promptMessage;

  • @kyxxp
    @kyxxp 2 года назад +3

    in PlayerInteract im getting a error for line 20 character 10. Error CS0111 "Type 'PlayerInteract' already defines a member called 'Update' with the same parameter types.
    Ive been stuck on this for HOURS & some help would be much appreciated

    • @jumpydaman
      @jumpydaman 2 года назад +5

      You probably have two copies of the same script with the same name

    • @kyxxp
      @kyxxp 2 года назад +1

      @@jumpydaman yeah I felt like an idiot when I figured that out lol, but thank you!

    • @goozjeesh46
      @goozjeesh46 2 года назад +1

      @@jumpydaman i love you so much

  • @regan4351
    @regan4351 2 года назад +2

    Assets\Scenes\scripts\PlayerInteract.cs(31,53): error CS0246: The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?)
    How do i fix it plz help

  • @xtreamfighter
    @xtreamfighter 11 месяцев назад +1

    I get the error that 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?) What could this mean?

    • @peterfarago7727
      @peterfarago7727 10 месяцев назад

      same

    • @peterfarago7727
      @peterfarago7727 10 месяцев назад +2

      I FOUND THE SOLUTION ON THIS:
      Assets\Scripts\Player\PlayerInteract.cs(35,34): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)
      In the PlayerInteract script the 35th line you have to change OnFoot --> onFoot. It is wrong in the video , dont use capital letter. Just simple onFoot. The right line is: " if (inputManager.onFoot.Interact.triggered) "

    • @Haflige
      @Haflige 5 месяцев назад

      @@peterfarago7727 That is the same error message we all get, yes. Am I missing something here, what was the solution you found?

  • @themineguy1234
    @themineguy1234 Год назад +1

    hey
    so i want to make a first person cooking game and i want to move objects like in portal
    how do i do that

  • @zhangtom4607
    @zhangtom4607 Год назад +1

    Assets\Scripts\Player\PlayerInteract.cs(38,34): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)
    I don't know how to fix it

    • @peterfarago7727
      @peterfarago7727 10 месяцев назад

      same here

    • @peterfarago7727
      @peterfarago7727 10 месяцев назад +1

      I FOUND THE SOLUTION ON THIS:
      Assets\Scripts\Player\PlayerInteract.cs(36,34): error CS1061: 'InputManager' does not contain a definition for 'OnFoot' and no accessible extension method 'OnFoot' accepting a first argument of type 'InputManager' could be found (are you missing a using directive or an assembly reference?)
      In the PlayerInteract script the 36th line you have to change OnFoot --> onFoot. It is wrong in the video , dont use capital letter. Just simple onFoot. The right line is: " if (inputManager.onFoot.Interact.triggered) "