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

Поделиться
HTML-код
  • Опубликовано: 21 фев 2022
  • The second video in the Lets Make a First Person Game series!
    🖐In this video we are going to setup the foundations for our interaction system.
    Come Join us on the Discord!
    🎮 / discord
    💚 Thanks for watching!
    Helpful Links
    dotnettutorials.net/lesson/te...

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

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

    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 года назад +1

      no problemo thanks for the fixes!

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

      thanks man!

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

      ty very muchoo !

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

      when did we make a door in the last episode?

    • @WhiteKnuckleRide512
      @WhiteKnuckleRide512 Год назад +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.

  • @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 :)

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

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

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

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

  • @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 :)

  • @iconunited190
    @iconunited190 2 года назад +59

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

  • @DrummerCAS
    @DrummerCAS Год назад +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!

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

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

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

    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.

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

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

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

    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

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

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

  • @donaldfaulknor2149
    @donaldfaulknor2149 7 месяцев назад +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.

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

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

  • @Squishen
    @Squishen 6 месяцев назад +13

    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.

  • @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 ;)

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

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

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

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

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

    Thanks for this great series!

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

    Thank you for the great tutorial!

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

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

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

      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 2 месяца назад

      Happy birthday bro

    • @pranavajay5528
      @pranavajay5528 Месяц назад

      it was 2 years ago @@armando_gamer1929 💀💀

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

    the best one so far, bravo!!

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

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

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

    Really Good Tutorial Thank you dude

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

    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

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

    Thank you. You are an excellent teacher

  • @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!

  • @DieterSoost
    @DieterSoost 7 месяцев назад +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 👍

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

    this helped me a lot thanks

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

    Thanks. Keep it up !

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

    Thank you so much you've been a big help

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

    Yesss been waiting for this

  • @Mali-Man11
    @Mali-Man11 12 дней назад

    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.

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

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

    • @ripethics5422
      @ripethics5422 10 месяцев назад +7

      agree

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

      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 8 месяцев назад +1

      @@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 Месяц назад

      did anyone found out how to setup the scene??

    • @abdelilahbakouri942
      @abdelilahbakouri942 Месяц назад

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

  • @GakuranHituji
    @GakuranHituji Год назад +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.

  • @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 Месяц назад

      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!

  • @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

  • @orvobx7909
    @orvobx7909 Год назад +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 Год назад

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

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

      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.

  • @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 Год назад

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

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

      @@NattyGameDevcan u show us how the door?

  • @mdszirgun8715
    @mdszirgun8715 10 месяцев назад +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

  • @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

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

    you the man

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

    you are the best, and plZ upload fast

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

    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 11 месяцев назад

      lifesaver

    • @user-gl7gj5mq2n
      @user-gl7gj5mq2n 10 месяцев назад

      Thanks

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

      Sorry can you explain what you mean, does this mean you will or won't be able to interact with things through walls if you set this?

  • @user-if1zb3ix3y
    @user-if1zb3ix3y 11 месяцев назад

    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 6 месяцев назад

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

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

    very helpful thank euuu

  • @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?

  • @PilotInspektor
    @PilotInspektor Год назад +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 Год назад +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?

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

    you are legend thanks

  • @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

  • @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 🤣

    • @user-gl7gj5mq2n
      @user-gl7gj5mq2n 10 месяцев назад

      I was confused too

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

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

  • @TeamRadioDrill
    @TeamRadioDrill 11 месяцев назад +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 15 дней назад

      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!

  • @quinFN_
    @quinFN_ Год назад +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?

  • @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?)

  • @mrjryan44
    @mrjryan44 Месяц назад

    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

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

    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!

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

    Need MORE!

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

    terrific job Natty Gamedev!

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

    LEGEND

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

    im trying to make more interactables. when i go close to the new ones, it doesnt come up with any text. but when i go to the keypad, it shows the keypad text on all of them. please how do i make this. im doing a project with lots of interactables
    thank you

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

    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

  • @powaldsd27
    @powaldsd27 Год назад +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.

    • @user-gh4oc6gr1h
      @user-gh4oc6gr1h Год назад

      me too

    • @Hemming_Estorsky
      @Hemming_Estorsky 11 месяцев назад

      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 :)

  • @rca6798
    @rca6798 Год назад +20

    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  Год назад +13

      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 Год назад +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 Год назад +1

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

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

      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 Год назад +10

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

  • @Mati-lx7om
    @Mati-lx7om 8 месяцев назад

    i have this problem Assets\scripts\PlayerInteract.cs(28,38): error CS0118: 'hitInfo' is a variable but is used like a type

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

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

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

    were the video for the door an keypad i didn't see it in the first video an i can't get into your discord to try to find it just need some direction?

  • @maestrohulk746
    @maestrohulk746 11 месяцев назад +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?

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

    i was having issues with the text prompt popping up when my raycast lines up with my button but i have no errors the code is fine and i have the scripts connected to the right objects so what do i do?

  • @dieferstudiosdiego9337
    @dieferstudiosdiego9337 2 месяца назад +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

  • @superdeveloper1805
    @superdeveloper1805 11 месяцев назад

    Very good work!! I just started programming in Unity and it already seems super-powerfull! And a little problem: It started appearing a little joystick at the bottom of the screen. Should it be there?

    • @user-gl7gj5mq2n
      @user-gl7gj5mq2n 10 месяцев назад

      If you did the first episode, we have to do xbox ios controls, if I remember, maybe its that/

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

      @@user-gl7gj5mq2n no, i just found out is a gizmo but thanks anyway

  • @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

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

    yo man great vids learning alot your honestly great big up my man for that. but im have trouble finding out how to centre the camera when the game starts i currently always start looking at the floor. also i have a big box in the scene saying "new text" when i click on "canvas" it highlights it, any suggestions? @Natty Creations

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

    um i have an issue inside this if statement if(inputManager.onFoot.Interact.triggered)
    it is detecting the input but when it calls the base interact function the debug.log doesn't work
    I dont know to fix this pls help

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

    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". 🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️

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

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

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

    also, when you clicked on the keypad, you changed the prompt message on the right. could you tell me why i didnt have that?

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

    I have a problem where the interact key is double clicking without being pressed more than once. Any ideas how to fix?

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

    Uhh i think this is an error prior to the previous one but i cant test out the game as the error says :
    the variable cam is not assigned(player look)
    please i want quick help

  • @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 Год назад

      i believe he addressed that in the comments

    • @peterfarago7727
      @peterfarago7727 3 месяца назад +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) "

  • @Anakin.Skywalker44
    @Anakin.Skywalker44 11 месяцев назад +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 !

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

    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

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

    Hey guys everything was fine until I entered this line of code @6:15
    if (Physics.Raycast(ray, out hitInfo, distance, mask))
    for some reason there's a red squiggle at the end of it (25,59)
    any ideas I'm dead sure I entered it correctly thanks in advance

  • @crissutaun
    @crissutaun 8 месяцев назад +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 3 месяца назад

      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 3 месяца назад

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

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

    I am at 9:25 and i don't get any errors and did everything but when i go to the door it doesn't appear in console. One thing that i have to say i put the keypad to be the door cause i am trying to press on the door and open it. The door layer has interactable

  • @SWTOR-Homemade
    @SWTOR-Homemade 3 месяца назад

    im in 2024, this still works great!

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

    When this game is exported, will it continue to use the "look with mouse" system as shown or will it be a similar system as to most first person games? I just find the system somewhat obnoxious.

  • @command_crafter1004
    @command_crafter1004 9 месяцев назад +2

    Assets\Scripts\Player\Playerinteract.cs(34,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?)

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

      I have the same error

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

      it should be "onFoot", but then you get this error message:
      PlayerInteract.cs(36,33): error CS0122: 'InputManager.onFoot' is inaccessible due to its protection level

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

      @@vasyuey i tried that already

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

      @@command_crafter1004 i figured it out. It works now for me. Send me the error you get now, and i will tell you how to fix it

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

      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) "

  • @snowfoxvr4874
    @snowfoxvr4874 2 месяца назад +1

    hey @Natty GameDev when I walk The white ray that interacts with things does no follow me how can i fix
    i would ask you on discord but the invite is invalid and thank you ;)

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

    I have an error where during the final part of making the door open I can't open the door because it says "The variable door of Keypad has not been assigned" but I followed everything in the video and tried to tweak things but the door still won't open.

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

    Çok teşekkürler

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

    Thanks for the totorial! But I keep getting the message that playerUI is inaccessible due to its protections, setting it to public didn't help, please advice!

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

      make it public

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

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

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

    how do i make the doors a different colour then the walls? and how do i make the switch?

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

    I have a error and it says that error CS0117: 'PlayerUI' does not contain a definition for 'UpdateText'

  • @user-ob1vq5th4x
    @user-ob1vq5th4x 2 месяца назад

    I don't know how to fix this error. "Assets\Scripts\PlayerInteract.cs(29,74): 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?)"

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

    i don't know why but after adding the animations and finishing the keypad script, when i try playing, it doesn't work when i interact with the keypad, i press E but nothing happens, it doesn't say anything about it in the console either

  • @jamespennington6428
    @jamespennington6428 Месяц назад

    7:40 “The type or namespace name 'Interactable' could not be found” does this have to do with me having to put the Interactable layer on layer 8?

  • @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 Год назад

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

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

      @@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 Год назад +1

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

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

      @@r0gue278 Ah, yep. Casing definitely sucks

  • @shrenikmunot9897
    @shrenikmunot9897 14 дней назад

    Hello , can you please explain how did you create the doors and other objects....It's my first 3D game and I don't know how to create those objects without any tutorials