#1 FPS Movement: Let's Make a First Person Game in Unity!

Поділитися
Вставка
  • Опубліковано 8 лют 2025

КОМЕНТАРІ • 3,5 тис.

  • @NattyGameDev
    @NattyGameDev  3 роки тому +1717

    Hey everyone!!
    I have recently discovered that 2D vector composite has been changed slightly in later versions of Unity
    In this tutorial I am using 2020.3.8f1..
    In order to do the same thing.. you will need to change some of the properties of the Movement action...
    So with the Movement action Selected:
    - In the the Properties tab
    - Change the 'Action Type' to Value
    - Change the 'Control Type' to Vector 2
    Now you will be able to right click on the Movement action and Add an Up/Down/Left/Right Composite!
    Hope this helps! 😃
    Also I left it out of the video but if anyone is having trouble implementing crouch and sprint, you need to define some extra properties for these at the top of your PlayerMotor script
    lerpCrouch, crouching, sprinting -> bool
    crouchTimer -> float

    • @andubunea9627
      @andubunea9627 3 роки тому +16

      hello there man can u continue the series pls or atleast make a tutorial on how to get such good graphics like post proccesing and stuff cs everytime i create a new project the project has such bad graphics

    • @MidnightZero-i6z
      @MidnightZero-i6z 3 роки тому +3

      Hey i know your busy but I need some help really bad when you dragged the camera on to the player look script it had a place for it mine doesn't do you know what I could of done wroung

    • @NattyGameDev
      @NattyGameDev  3 роки тому +8

      @@MidnightZero-i6z so the only line that will relate to being able to do that is public Camera cam;. So what I would recommend is make sure that it is public :). If there are any compiler errors before you saved the script then it will cause unity to not actually update the inspector, so maybe that could be causing the property to not show up... :). Alternatively if you want to do everything through code. You don't need a public Camera and you can use Camera.main to find the camera with the tag "MainCamera".. then you won't need the "cam" property... I will be setting up a discord soon to provide more reliable help if you would like to join then feel free to send me an email (which is in my channel page) and I will send an invite :)

    • @NattyGameDev
      @NattyGameDev  3 роки тому +13

      @@andubunea9627 I am definitely keeping this series going and I will be covering post processing in order to make you game look awesome!! Apologies for the delay in getting the next one uploaded. It will be up in the next few weeks ! :D Thanks for watching!

    • @MidnightZero-i6z
      @MidnightZero-i6z 3 роки тому +7

      @@NattyGameDev Hey I fixed it up and now it works I would like to say thank you for your response I wasn't expecting you to lol

  • @jay.b843
    @jay.b843 2 роки тому +30

    understood about one percent but thats the most ive ever understood from any unity tutorial ever, so good job

  • @eminkilicaslan8945
    @eminkilicaslan8945 2 роки тому +856

    For those who couldn't find 2D vector binding: you have to select your action (Movement) and change action type to value and control type to Vector 2.
    Edit: This is briefly same as in pinned comment

  • @abel099
    @abel099 2 роки тому +403

    if you want to implement crouching and sprinting don't forget to add a:
    bool crouching = false;
    float crouchTimer = 1;
    bool lerpCrouch = false;
    bool sprinting = false;
    do this in the playermotor script next to the other floats and bools (at the top of the script)

    • @Fumestsu1232
      @Fumestsu1232 2 роки тому +3

      thanks 😃

    • @jaceleeanderson
      @jaceleeanderson 2 роки тому +13

      I was able to implement crouch and sprint successfully, however pressing down on the left game pad stick activates a sprint and deactivates when I press it again. Is there a way to sprint only while the left game pad stick is pressed?

    • @vincentgomes8209
      @vincentgomes8209 2 роки тому

      Thanks dude

    • @willysmb-bo2vn
      @willysmb-bo2vn 2 роки тому +16

      @@jaceleeanderson When you go to the screen where you set up your controls you click on your control (sprint/crouch) and on the right side there is "Action type" which you set to pass through. Then there appears another field right under the last where you choose button.

    • @andremiguelanana9398
      @andremiguelanana9398 2 роки тому +1

      Thank's it help a lot

  • @monkeywrenchsoft8531
    @monkeywrenchsoft8531 2 роки тому +187

    If you want to toggle sprinting:
    -Go to your Input Actions
    -Go to the Sprint action map
    -Add a "Press" type Interaction
    -Make the trigger behavior "press and release"

    • @kingd0ofus
      @kingd0ofus 2 роки тому +1

      What version were you using?

    • @monkeywrenchsoft8531
      @monkeywrenchsoft8531 2 роки тому +1

      @@kingd0ofus 2021.3.12f1

    • @xusonline
      @xusonline 2 роки тому +1

      thank you so much bro

    • @NeverEnoughTurbo
      @NeverEnoughTurbo 2 роки тому +3

      Thanks man, helped

    • @mariusbarbu1268
      @mariusbarbu1268 2 роки тому +2

      Thank you so much, i fixed the crouch as well, and fixed the jump not working properly by adding "Press" type interaction and make the trigger behaviour to "press".

  • @hansuswurstus888
    @hansuswurstus888 Рік тому +9

    Thx for your awesome work :)
    As a developer for myself (non gaming, being a junior for one month, fresh from school :P) I rly like your code structure and that you're coding a lot with data encapsulation, which makes it so much easier for me to understand your code and see the structure behind it.

  • @NattyGameDev
    @NattyGameDev  3 роки тому +118

    Thanks for all of the support and kind feedback!!!
    Just to let you all know I am working on getting the next video out!
    There are some more complicated concepts in the next one so I want to make sure they are easy to understand!
    Thanks again! ❤

    • @shortcut351
      @shortcut351 3 роки тому

      whe are you going to post it?

    • @half-maskedhero
      @half-maskedhero 2 роки тому

      Can I please get some help? I am trying to make my first game and have ran into a promblem. I would be greatly
      appreciated!!!

    • @darwik6t1
      @darwik6t1 2 роки тому +1

      @Natty Creations
      I'm just starting unity and I don't know any "properties tab" can u post a video or at least post some images thank u :D

    • @MedicatedGaming
      @MedicatedGaming 2 роки тому

      Any idea why my button inputs aren't making my character move? All the scripts are matching up, I've watched from the beginning five times or more, but every time I try to make the character move, it doesn't work. I opened the debugger and it's registering my button presses but it's not making anything happen.

    • @pongolabs
      @pongolabs Рік тому

      I'm using 2021.3.19f1 I don't see any of the movement stuff

  • @JasonSmith-pn6ch
    @JasonSmith-pn6ch 2 роки тому +36

    FYI: moving Jump from LateUpdate and Move from FixedUpdate to Update fixes stutters. Fixed and LateUpdate have moments of pauses, miliseconds but still induces stuttering on fast movements like turning your player.
    Just came across your tutorial, helped a ton. So many ways to go about setting up basic movement with the InputSystem, this seemed to make the most sense to me and actually able to understand what and why. Thank You!

    • @ThatBlenderDude_
      @ThatBlenderDude_ 7 місяців тому

      the wording of this comment is confusing me. can you please give more detail? does this mean i move the entire jump function inside a lateUpdate void?

    • @boremy_
      @boremy_ 7 місяців тому

      @@ThatBlenderDude_ he meant moving both functions 'Jump' and 'Move' into Update instead of FixedUpdate

    • @ThatBlenderDude_
      @ThatBlenderDude_ 7 місяців тому

      @@boremy_ so in inputmanager i move what is currently in the awake function into update?

  • @Islati
    @Islati Рік тому +104

    It would be nice if you can explain the classes, methods, and API's you're using, why you're doing it, and a higher level understanding. I get it cause I've been doing this for a long time, and it's fairly straightforward, but it's a bit quick from a viewer perspective.

    • @MrMelon-gs6bq
      @MrMelon-gs6bq Рік тому +17

      Idek what's happening I'm just copying what he does

    • @Islati
      @Islati Рік тому +40

      @@MrMelon-gs6bqthat’s the issue. You’re not learning much through imitation here

    • @realpotatogaming
      @realpotatogaming Рік тому

      but the game is cool tho@@Islati

    • @Gigapally
      @Gigapally Рік тому +9

      Can confirm this yea, i came here for a basic tutorial to learn and hes breezing through C# scripts in minutes.

    • @dominicd.1286
      @dominicd.1286 Рік тому +6

      Yeah, this tutorial is useful, but it's definitely not for beginners. He goes way too fast and its hard to follow along. I wish everything was explained so I can understand what the code is doing

  • @bigmik7306
    @bigmik7306 2 роки тому +48

    Just getting into game design and learning Unity!
    So glad I found this new tutorial series and cannot wait to get started - looks incredibly informative and professionally done.
    Thank you!

    • @euuda8267
      @euuda8267 2 роки тому +1

      Same! i'm also new to unity and game design.

    • @milandjukic4583
      @milandjukic4583 2 роки тому +1

      so did u learn anything after 7 months

  • @Zakio378
    @Zakio378 2 роки тому +17

    Great tutorial man! Managed to go though it all and done my own troubleshooting as I'm currently running 2021.3.13f1 version, some of the things changed here and there but in the end I got a fully functional FPS movement.
    Thank you

    • @cantbelieu
      @cantbelieu 7 місяців тому +1

      hey its giving me a error for this its the motor it gives me [06:06:59] Assets\scripts\PlayerMotor.cs(7,1): error CS0116: A namespace cannot directly contain members such as fields, methods or statements

  • @beatrizalbuquerque8792
    @beatrizalbuquerque8792 Рік тому +65

    For everyone having a camera stutter when sprinting or moving a little bit faster:
    --> go to Edit > project settings > time
    --> set Fixed Timestep to 0.005 (default is 0.2)
    Hope this helps!

  • @infinitelol2119
    @infinitelol2119 3 роки тому +48

    this is a very underrated tutorial and this series will help many beginner and intermediate game devs out, just wanna let u know, the community appreciates you don't stop, brackeys is proud of you

    • @BOOM_OCE
      @BOOM_OCE 2 роки тому

      agreed

    • @thetinywombat3848
      @thetinywombat3848 Рік тому

      Short question. So I followed the tutorial in every single step but when I tested it and press "W" may player actually moved "up" not "forward" do you now why that is?

    • @ItsGrimOutThere
      @ItsGrimOutThere Рік тому

      @@thetinywombat3848 months later but had this issue, check your moveDirection in ProcessMove. It Should be .x = .x and .z =.y

  • @lapurplemando5837
    @lapurplemando5837 3 роки тому +28

    Thank you so much for this tutorial! I had never used Unity to make anything before but this tutorial was very easy to understand, and I can’t wait for part 2!

  • @ElementRunRL
    @ElementRunRL Рік тому +13

    After 2 hours of debugging my first code, i finally got the inputs to move, feels good

    • @jakewatson862
      @jakewatson862 Рік тому

      I feel like I have followed all of the steps but when I run the program my character is not moving. I was wondering whether that is the same as what you had?

    • @Lawreeen
      @Lawreeen Рік тому

      yeah me too @@jakewatson862

    • @Jayc_405
      @Jayc_405 Рік тому

      @@jakewatson862 i have the same issue, have you found the problem

    • @mertylmaz-qu7vd
      @mertylmaz-qu7vd 11 місяців тому

      set the speed value@adventuresinhomeschoolingwithb

    • @mrjryan44
      @mrjryan44 10 місяців тому

      @@jakewatson862 same

  • @jorikspiritwolves7486
    @jorikspiritwolves7486 2 роки тому +19

    I'm very new to any form of programming and have only just finished the create with code pathway. But your instructions are so clear and easy to follow along that I finally can see myself trying to make a full-fledged game one day! :D Thank you so much for making these!!

    • @Frizou
      @Frizou 2 роки тому +2

      Really happy to hear people in the same situation understanding it well ! Maybe I have hope after all !
      So how much did you progress since ?

    • @jorikspiritwolves7486
      @jorikspiritwolves7486 2 роки тому

      I've been following another tutorial about the basics of voxelworlds and have almost finished that one.
      So unfortunately I haven't build my dream-game yet (also because of a fulltime job and only little time to work steadily on this hobby).
      But I have learned enough of the basics to continue prototyping the main game components :)
      I even made some crude platform 1-level games.
      I do have heavily underestimated the work it can take to make a game and have a LOT more respect for developers than I already had :)

  • @RoninDoesStuff
    @RoninDoesStuff 3 роки тому +55

    Brackeys for a long time has been the gold standard for a lot of us aspiring gamedevs, as far as tutorials go. However, now that most of his content has been outdated, the assets used within those tutorials are broken, and the amount of scouring comments to find a fix for a litany of problems introduced from the previous 2 problems, it's no longer useful.
    After doing some digging, I found this video and cannot express how relieved I am. Now that i have a proper working controller script, I'm going to play with it and learn what I can before moving on to your next video; btw I particularly loved the "homework" at the end of the video.
    As long as you keep these videos up to date (which btw, thank you for pinning the fix comment below about 2d vectors), I see no reason why you won't be the next unity guru on youtube! If you ever develop this course professionally on skillshare or something, let me know. I'd love to dive deeper, with longer videos explaining the code in detail and how it functions in relation to the assets.
    Keep up the great work!

    • @NattyGameDev
      @NattyGameDev  3 роки тому +9

      Thanks so much for those kind words! I'm so glad this video has helped you! I try very hard to make sure my videos are easy to follow and well designed so that everyone can be proud of their end product, and I'm still shocked that there's been such a positive response! It was a sad day when Brackeys stopped doing tutorials :(

    • @farizparkar3476
      @farizparkar3476 10 днів тому

      this toutrial deserves to be more popular

  • @alicerain8686
    @alicerain8686 Рік тому +3

    I'd like to add a tip in case people might also have been running into the same issues I have been. When following this tutorial, he places the movement inside of FixedUpdate. If you move, it would cause a stuttering effect (it did to me at least). Try putting the move code inside of LateUpdate, along with the camera look code. That should fix the issue.
    Not sure why this works differently for us, other than that amazing tutorial. I've had this similar issue while developing my own 2d games making the camera follow the player.

    • @carlizancho2
      @carlizancho2 Рік тому

      For what I see, the problem is because the camera is attached to the character object. Moving the movement code outside of the FixedUpdate can result in weird issues. nothkedev.blogspot.com/2017/11/how-to-cope-with-standard-unity-fps.html

    • @ChroniqueMission
      @ChroniqueMission Рік тому

      my camera wont move left and right help pls

    • @chaogrdn8993
      @chaogrdn8993 4 місяці тому

      Thanks a lot! This was very helpful!

    • @wildfire8360
      @wildfire8360 Місяць тому

      Nice one 😄

  • @selagia
    @selagia 3 роки тому +52

    This tutorial was really well made and easy to follow, thanks for making such a video. I’ve been struggling with the new input system and this made it way easier to understand. +1 sub

  • @blox2991
    @blox2991 3 роки тому +5

    dude.
    I cannot tell you how much that this video has helped me.
    thanks so much!

  • @thelaughtrack646
    @thelaughtrack646 25 днів тому +1

    For anyone confused, the reason that xRotation was placed in the X position of the Quarternion.Euler() to change the vertical angle is because rotation on an X axis actually causes vertically oriented change. Honestly that might have been super intuitive for some people, but I was sure as hell confused.

  • @mrnobody3122
    @mrnobody3122 2 роки тому +11

    Hi man, earned yourself a sub. I've been programming for about 6 years nearly half my life but only recently got into gamedev. This tutorial was wonderful and unlike other tutorials, you actually helped in the comments. I wouldn't have even been able to start without the 2d Vector control binding. I can see you doing very well

    • @missunknowngaming6890
      @missunknowngaming6890 2 роки тому

      I don't have the 2D vector Control Binding, any help?

    • @mrnobody3122
      @mrnobody3122 2 роки тому +1

      @@missunknowngaming6890 In the OnFoot action map, go to movement, in the action properties change action type from button to value, and then set the control type to vector 2

    • @missunknowngaming6890
      @missunknowngaming6890 2 роки тому

      @@mrnobody3122 THank you!

  • @ZephIAddy
    @ZephIAddy Місяць тому

    as a starting game dev this has been absolutely mint, thank you!

  • @MelatoninMadness
    @MelatoninMadness 3 роки тому +7

    So excited to follow an up to date tutorial series

  • @lobstalord9627
    @lobstalord9627 2 роки тому +6

    You sir a re a legend, it took me some time and I kept running into errors because my spelling was off but in the end I got everything working. I also visited your discord and within 2 min of asking a question I got an answer and programming help. Keep it up man :)

  • @banana_pancake1
    @banana_pancake1 Рік тому +5

    Just started to learn how to use Unity. I had some basic prior Python and C# knowledge of syntax and how to use the console, but I was reluctant to even open Unity, let alone try and use it. Then you came along and just made it all seem so simple! It was so easy to follow compared to other tutorials, so thank you!

  • @rustyrishii
    @rustyrishii 3 роки тому +9

    hey man @Natty Creations , this tutorial is amazing! I hope you continue this series! loved it!

  • @menti5013
    @menti5013 3 роки тому +4

    PLEASE CONTINUE THIS I LOVE IT!!! This is the way im going to be doing my movement from now on Thx

  • @Montigorable
    @Montigorable 9 місяців тому +1

    Literally the best explanation of new input functionality.

  • @CYKLER
    @CYKLER 2 роки тому +53

    For those wondering how to implement the last bit (crouch/sprint) if it is not working you need to make bools and floats underneath the jump height float at the top around line 12, it should look like this
    public float jumpHeight = 3f;
    Public bool lerpCrouch;
    Public bool crouching;
    Public bool sprinting;
    Public float crouchTimer;
    This took me a while to figure out so I hope this helps

    • @insaneproductions9117
      @insaneproductions9117 2 роки тому +2

      Thank you!

    • @insaneproductions9117
      @insaneproductions9117 2 роки тому +4

      Don’t know why he didn’t show that, but thank you for sharing something others might like me need help!

    • @curtisadams4321
      @curtisadams4321 2 роки тому +1

      Thank you so so much!

    • @damnthishandleistaken
      @damnthishandleistaken 2 роки тому +1

      What does the crouchTimer do?

    • @CYKLER
      @CYKLER 2 роки тому +1

      @@damnthishandleistaken I posted this 4 months ago I don’t remember but it works

  • @guidofazzito
    @guidofazzito 3 роки тому +4

    This serie is gonna be awesome. Thank you!

  • @largiegorgle
    @largiegorgle Рік тому +1

    Thank you so much for this tutorial, I was stuck on first person character control, no other tutorial helped me, and now I know how to use the new input system for other ideas!

  • @dariusjackson1960
    @dariusjackson1960 2 роки тому +7

    outstanding video bro. So surprised to see your sub count. whole video was comprehensive and i like how you allowed the viewers to try some new stuff on their own. Im new to coding and i feel like the shit bc i figured out the sprint and crouch lol. I said that to say your method was effective teaching-wise. keep it up

  • @NeverEnoughTurbo
    @NeverEnoughTurbo 2 роки тому +67

    Can we all just take a moment to appreciate @Natty Creations, to thank him for all the valuable time of his, he is taking to teach this to us.

    • @ZenEditz__
      @ZenEditz__ Рік тому +2

      bro i think he meant to reply

  • @teenageapocalypseusa5368
    @teenageapocalypseusa5368 Рік тому +1

    My hope is to make a game like FEARS TO FATHOM one day. You have given me a place to begin my journey!

  • @terraxanthis82
    @terraxanthis82 3 роки тому +30

    The new input system has been so difficult to wrap my head around. Hoping you cover some other basics (doors, buttons, etc.) because there's so few tutorials out there for it! Also, as a side-note, were you planning on going further in-depth on crouching? What you provided was solid, and I've gotten it working well enough, and I THINK I could figure out raycasting to prevent standing up and clipping into objects on my own, but I'm also having the player clip through walls that are low enough to walk under, but still at camera height. Bit weird, and still not sure where to start on that. Either way, looking forward to more!

    • @NattyGameDev
      @NattyGameDev  3 роки тому +4

      My next video will cover an interaction system that I think is awesome! Very easy to create heaps of interactions quickly, (it's taking abit longer than I hoped as it's been a very busy few weeks)
      Yeah, you could definitely do it that way,. raycast upwards when you are crouching, and if the raycast detects anything above head height, then just return; so that it doesn't cancel the crouch..
      And for the player clipping through walls would it be possible to do a simple fix of just lowering the camera slightly ?? If not let me know and we can work out another way to fix this :)
      Thank you so much for watching and commenting!

    • @terraxanthis82
      @terraxanthis82 3 роки тому

      @@NattyGameDev Absolutely! Excited to see what you've got in the next video.

    • @terraxanthis82
      @terraxanthis82 3 роки тому

      @@NattyGameDev I've kept working away (sort of focused on modeling and environmental stuff, not so much code!) and since I've started building levels with steep slopes and walls, I was wondering if you had a solution for making the player slide down steep slopes? The default character controller only handles what slopes you can walk up, but not making you fall down them-- as a result, you can stand and hop all the way up a nearly-90* angle wall! Any suggestions on that front?

    • @NattyGameDev
      @NattyGameDev  3 роки тому

      @@terraxanthis82 Have you tried messing around with Physic Materials ??
      With a raycast you could find out the angle of the ground relative to the player, . and if the angle exceeds a certain amount swap out the physics material that has the dynamic friction turned down to 0.

    • @salesbangloresalesbanglore5384
      @salesbangloresalesbanglore5384 2 роки тому

      @@NattyGameDev help i am having this errorAssets\Scripts\InputManager.cs(23,43): error CS1061: 'InputAction' does not contain a definition for 'Readvalue' and no accessible extension method 'Readvalue' accepting a first argument of type 'InputAction' could be found (are you missing a using directive or an assembly reference?)
      how to fix it ?

  • @pulkitsinha3183
    @pulkitsinha3183 Рік тому +51

    For everyone struggling to add scripts into Player, make sure that at the very top of the script after the imports once it's definition starts, the first line looks like
    public class PlayerMotor : MonoBehaviour
    and not
    public class NewBehaviourScript : MonoBehaviour
    (when you're trying writing the PlayerLook script, change name according to the script you're writing).
    For some reason this happens automatically on his screen but I had to do it manually everytime (probably because I didn't set the name of the script immediately on creation the way he did, I switched back to the video first to double check the name then renamed my script, which led to the wrong name being present in the definiton).

    • @LitoMike
      @LitoMike Рік тому +4

      still doesn't work

    • @Cidity0qzi90z
      @Cidity0qzi90z Рік тому +1

      @@LitoMike can you please send me your code because after you change the class it should fix.

    • @tomatosalad953
      @tomatosalad953 Рік тому +1

      Thanks, I also had the same problem and after doing what you've said it worked

    • @drapadon
      @drapadon Рік тому +1

      ty:)

    • @dylancolin5045
      @dylancolin5045 Рік тому +1

      thanks

  • @erikbach8436
    @erikbach8436 Рік тому

    i had some problems while doing it but with the help of comments everything works, very happy with ur tutorial m8

  • @SpaceCadet0023
    @SpaceCadet0023 2 роки тому +4

    This tutorial was amazing. I have been trying to find a tutorial for a first person game forever and this one worked, Thank you so much! :>

  • @CrawdadSoftware001
    @CrawdadSoftware001 Рік тому +4

    In case guys you have problem with no “Add 2D Vector Composite” when you right click on your input this is what you must do, On the right, change your movement action type to "value" and control type to "vector 2"
    Then right-click on movement and choose Add Up\down\left
    ight composite, thats all.

  • @ryuzoraa
    @ryuzoraa 7 місяців тому

    yo man, im 2 years late but this video really helps a lot!!!. im new into game development and i never learn c# before, but the way you explain makes me understand the scripting ( cause i know c++ and js and i think its kinda similar ) but anyway well done dude, youre such a goat

  • @ferdinandw.8952
    @ferdinandw.8952 2 роки тому +8

    Can We Please appreciate THAT UA-cam SAYS ITS UNREAL ENGINE?

  • @iSilleNcN
    @iSilleNcN 2 роки тому +13

    You can also set the Sprint interaction to be triggered on press and release by adding an Interaction "Press" then set this to trigger on Press and Release, this will allow you to hold the Shift button or mapped keypad button down instead of pressing once to sprint then again to walk.

    • @iSilleNcN
      @iSilleNcN 2 роки тому +1

      Likewise, this can be set for the crouch interaction as well but I prefer the press to crouch press to stand method

    • @sugomayea2674
      @sugomayea2674 2 роки тому +1

      Thanks! I was trying to figure out how to do this

    • @pollisgaming3168
      @pollisgaming3168 2 роки тому

      thanks!!!

  • @fubecafy
    @fubecafy Рік тому +1

    This is fantastic! I hope you'll continue the series!

  • @MarjleyLemonade
    @MarjleyLemonade Рік тому +3

    Thanks I’m 12 and luckily found this I’ve subbed you’re awesome man

  • @vitalityraider650
    @vitalityraider650 2 роки тому +82

    nice tutorial but just a suggestion, please dont cut the clips when adding more lines and curly brackets because then it causes more errors in our code, but other than that amazing tutorial!

    • @Tides_MM2
      @Tides_MM2 2 роки тому +1

      yes in 7:10 i got an error saying numre blah blah blah

    • @DaWaffleDog
      @DaWaffleDog 2 роки тому

      Not rlly annoying for me

    • @vitalityraider650
      @vitalityraider650 2 роки тому +2

      @@DaWaffleDog good for you man

    • @DaWaffleDog
      @DaWaffleDog 2 роки тому

      Why the heck did u reply, its almost =been an year

    • @vitalityraider650
      @vitalityraider650 2 роки тому +4

      @@DaWaffleDog why the heck did you reply to a year old comment

  • @MikeyMijey
    @MikeyMijey Місяць тому

    for the sprinting make sure in the input mapping you set the interactions in the action properties to press, and trigger behaviour to press and release

  • @Alstun
    @Alstun 2 роки тому +154

    Just for some confused people, for me the 2D vector was named as the up/down/left/right composite instead of 2D vector

    • @zaxtty8542
      @zaxtty8542 2 роки тому +1

      @@21ns3cur3 same I don't understand

    • @rayhan285
      @rayhan285 2 роки тому +11

      Yeah there's only positive and negative binding and another binding with one or two modifier

    • @atticusperkins8525
      @atticusperkins8525 2 роки тому +2

      @@rayhan285 Exactly

    • @joshuang.1154
      @joshuang.1154 2 роки тому +127

      @@rayhan285 Click the action, then action type, change it from button to value, then the control type will appear , choose vector 2, then go ahead and click the "+" sign on your action and now it will show add up down left right composite

    • @dot6800
      @dot6800 2 роки тому +10

      @@joshuang.1154 u saved my life thx

  • @lots0bots
    @lots0bots 2 роки тому +7

    I couldn't figure out why my character wasn't moving so I deleted the project and started over, got to 11:53 and laughed once I heard "we can drag our scripts onto our player." I don't know how I missed that the first time lol.

  • @CryptoVan
    @CryptoVan Рік тому

    Wow, I love how people in the comment helping each other and dropping some tips

  • @brijeshkumbhare5320
    @brijeshkumbhare5320 Рік тому +5

    In the ProcessMove you can add this code to move the player back/front instead of up/down
    float HMove = Input.GetAxis("Horizontal");
    float VMove = Input.GetAxis("Vertical");
    Vector3 moveDirection = new Vector3(HMove, 0.0f, VMove);
    controller.Move(transform.TransformDirection(moveDirection) * speed*Time.deltaTime);

    • @ivanscappini
      @ivanscappini Рік тому

      THANKS

    • @TheSaviourOfHumanity
      @TheSaviourOfHumanity Рік тому +8

      well no, if youre moving up and down instead of front and back, its because youve typed moveDirection.y = input.y; instead of moveDirection.z = input.y;

    • @Shyonn
      @Shyonn Рік тому

      rahnosam you are my hero thank you@@TheSaviourOfHumanity

    • @JAPM1997
      @JAPM1997 Рік тому

      Yeah, my player jump instead of go forward when i pressed W, thanks a lot@@TheSaviourOfHumanity

    • @mumbo4567
      @mumbo4567 16 днів тому

      you're the goat

  • @ziyadarif3119
    @ziyadarif3119 2 роки тому +224

    Bruh does anyone else feel like they are just copying him, but not actually learning anything. Good tutorial but I feel that it moves a bit too fast without explaining how we can do this ourselves.

    • @ProDelta25
      @ProDelta25 Рік тому +7

      Bro sameeee

    • @StandupWind709
      @StandupWind709 Рік тому +8

      At about 7:42 what app does he use?

    • @ziyadarif3119
      @ziyadarif3119 Рік тому

      ​@@StandupWind709 Visual Studio

    • @drnotuseless
      @drnotuseless Рік тому

      @@StandupWind709visual studio

    • @der-Dritte
      @der-Dritte Рік тому +5

      I would recommend to understand and write a code in a different way. Like what does it and try to write a unique code

  • @Sa-r-king-su4fg
    @Sa-r-king-su4fg Місяць тому

    this video actully helped me even though unity changed some stuff but the comment section helped me out thanks for the easy tutorial +1 subscriber

  • @ajinkyax
    @ajinkyax 2 роки тому +19

    Thank you for this series. I have one question, why not just use Rigidbody for gravity and collisions

    • @sandycolours641
      @sandycolours641 Рік тому

      there are advantages and disadvcantages to move movement methods there are a few videos on it on youtube

  • @DevNicitis
    @DevNicitis 2 роки тому +10

    The screen jittering issue can occurs in this code when the player moves and rotates the screen simultaneously.
    You can resolve this issue by moving 'motor.ProcessMove(onFoot.Movement.ReadValue());' from the FixedUpdate method to the Update method in InputManager.
    But this might cause many collisions problem. So, I recommend interpolating the rotation.
    Here's the tutorial: ua-cam.com/video/qtV8JEIq0Ng/v-deo.html
    With this solution, you need to rotate the player in the FixedUpdate method.

    • @maritimeyoutubeengineer3354
      @maritimeyoutubeengineer3354 2 роки тому +2

      smoothDeltaTime fixed it for me, but the video is more than helpful

    • @micol04
      @micol04 Рік тому +1

      @@maritimeyoutubeengineer3354 how did you implement the smooth delta time. Thank You

    • @Thouova
      @Thouova Рік тому

      Thank you for posting this! I'm trying to continue working on the framework this tutorial provides and that jittering was driving me mad.

    • @Xx3tha10xX
      @Xx3tha10xX Рік тому

      @@micol04
      public static float smoothDeltaTime;
      you would put that in the PlayerMotor script near the top around line 12.

  • @chancewillmore3329
    @chancewillmore3329 2 роки тому +7

    For those wondering how to make the sprint or crouch toggleable, here was my solution
    onFoot.Sprint.started += ctx => motor.Sprint();
    onFoot.Sprint.canceled += ctx => motor.Sprint();
    and you would just do the same for Crouch

  • @shrom6753
    @shrom6753 26 днів тому

    for a video thats 3 years old evrything worked perfectly great tutorial

    • @MichiganGameDev
      @MichiganGameDev 24 дні тому

      did you have the error of your player falling through the floor after removing the collider?

  • @prophet9154
    @prophet9154 2 роки тому +5

    TURN OFF OTHER COLLIDERS! I had a second capsule collider enabled on my player model and spent HOURS combing through code only to realize the Character controller was colliding with my capsule collider. The results were a phantom pill flying around an arena at mach 5

  • @abdalrahmanali6701
    @abdalrahmanali6701 2 роки тому +9

    First, thank you very much
    I would like to correct an error in the InputManager in line 8 that is "public PlayerInput.OnFootActions onFoot;" is not "private PlayerInput.OnFootActions onFoot;" and in PlayerInteract line 36 the error is "onFoot" is not "OnFoot"

    • @Raghav69-k5e
      @Raghav69-k5e 11 місяців тому +1

      Thank you so much for this i have not done this yet but tomorrow I will fix it and I hope that it will fixed pls pray 😅😅

  • @StinkiiChan
    @StinkiiChan 8 місяців тому

    Thanks for making this video. I found it to be incredibly helpful! :]

  • @mrjryan44
    @mrjryan44 10 місяців тому +3

    I had this issue where the keys would register in the debugger but my camera did not move for the player. The solution was making sure OnEnable() and OnDisable() were capitalized correctly. I also had to fix about 15 compiler errors due entirely to capitalization errors, and one misspelling. So, this is likely where more issues lie for people., It took me 30 minutes to find my OnEnable() issue.

    • @lokhimcheung9262
      @lokhimcheung9262 10 місяців тому +1

      Thanks that was exactly my problem

    • @jknumber
      @jknumber 5 місяців тому

      thanks sm, that was the issue

    • @misskobayashi57
      @misskobayashi57 5 місяців тому

      No wonder it didn't move, this was my exact problem. Thanks man!

  • @dylanbackstrum8856
    @dylanbackstrum8856 Рік тому +6

    can anyone help? At 11:08 I'm stuck, it says that "PlayerMotor" doesn't exist in the line "private PlayerMotor motor;"

    • @pranathisrivatsa1806
      @pranathisrivatsa1806 11 місяців тому

      Same idk what to do. If u have got it kindly reply

    • @LoucosDoMetro
      @LoucosDoMetro 10 місяців тому

      @@pranathisrivatsa1806: I'm assuming you guys have a 'typo'.
      [PlayerMotor.cs]
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      /// Class Containing Player Movement Functionality
      public class PlayerMotor : MonoBehaviour
      {
      private CharacterController controller;
      private Vector3 playerVolocity;
      public float speed = 5F;
      // Start is called before the first frame update
      void Start()
      {
      }
      // Update is called once per frame
      void Update()
      {
      }
      /// Receive the Inputs for the InputManager.cs and Apply them to the Character Controller.
      ///
      public void ProcessMove(Vector2 input)
      {
      Vector3 moveDirection = Vector3.zero;
      moveDirection.x = input.x;
      moveDirection.y = input.y;
      controller.Move(transform.TransformDirection(moveDirection) * speed * Time.deltaTime);
      }
      }
      [InputManager.cs]
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      using UnityEngine.InputSystem;
      /// Class that manages all the Keyboard and GamePad Inputs.
      public class NewBehaviourScript : MonoBehaviour
      {
      private PlayerInput playerInput;
      private PlayerInput.OnFootActions onFoot;
      private PlayerMotor playerMotor;
      // Start is called before the first frame update
      void Awake()
      {
      playerInput = new PlayerInput();
      onFoot = playerInput.OnFoot;
      playerMotor = GetComponent();
      }
      // Update is called once per frame
      void FixedUpdate()
      {
      // > Tell the Player Motor to Move using the Value from our Movement Action
      playerMotor.ProcessMove(onFoot.Movement.ReadValue());
      }
      private void OnEnable()
      {
      onFoot.Enable();
      }
      private void OnDisable()
      {
      onFoot.Disable();
      }
      }

    • @issykidding
      @issykidding 3 місяці тому

      Don't know if you figured this out, but PlayerMotor was the name of his Player Controller script, so if you named it something different, it can't find it. If you did name it PlayerMotor then make sure it is attached to the player gameobject.

    • @james-qk7ii
      @james-qk7ii 2 місяці тому

      Anybody looking for solution, In the Player Motor script at the top change class name to
      public class PlayerMotor : MonoBehaviour

  • @mrGAMER-tw9xu
    @mrGAMER-tw9xu Рік тому

    bro thank you so much my dream is to become a game developer I had some issues with coding on vs code on Mac but fixed it and everything works thank you so much man I really appreciate it

  • @RusticPlayz
    @RusticPlayz 5 місяців тому +3

    Dude. this guy is the goat, every tutorial i watch on making a game in unity never works, this is simple and so far has worked
    EDIT: THIS GUY IS FRICKING TRASH, MY CODE WONT WORK AND I WISH ANYTHING I DID EVER WORKED

    • @Yoseffa1786
      @Yoseffa1786 5 місяців тому +1

      Which part are you having difficulty with

    • @RusticPlayz
      @RusticPlayz 5 місяців тому +1

      @@Yoseffa1786 my code doesnt work, im using version 2022.3.19f1, my code doesnt work at all and some of the code has diffrent coloured text to his colours, i dont know why nothing ever works for me

  • @LoucosDoMetro
    @LoucosDoMetro 10 місяців тому +5

    Update on Tutorial Issues (2024, 03.25) - Unity v2022.3.22/1
    -> Missing "2D Vector Binding":
    1. Under Actions, Select: "Movement"
    2. Under "Action Properties" Tab > "Action Type" > Set it to: "Value"
    3. Under "Action Properties" Tab > "Control Type" > Set it to: Vector 2.
    4. On Action Tab, Select and Right Click: "Movement"
    5. Select: "Add UP/DOWN/LEFT/RIGHT Composite"
    -> Player NOT Moving:
    Ensure the Player Contains the following Scripts:
    - Input Manager.cs
    - Player Look.cs
    - Player Motor.cs
    If not: Select Player Object, then Drag and Drop the Scripts.
    -> Missing References:
    Ensure each script class names are consistent with their file names.
    -> Sprint & Crouch
    Add these variables to "PlayerMotor.cs"
    bool crouching = false;
    float crouchTimer = 1;
    bool lerpCrouch = false;
    bool sprinting = false;
    and these Methods:
    public void Crouch()
    {
    crouching = !crouching;
    crouchTimer = 0;
    lerpCrouch = true;
    }
    public void Sprint()
    {
    sprinting = !sprinting;
    if (sprinting) { speed = 8; }
    else { speed = 5; }
    }

    • @LoucosDoMetro
      @LoucosDoMetro 10 місяців тому

      Had to give up on a tutorial without support and missing information.
      Sure, it is good for you to figure it out. It allows you to think for yourself (something society and their systems want you not to do).
      I guess it is worth to get an idea on how keybindings work (Input).

    • @M.Id404
      @M.Id404 10 місяців тому +1

      thx

    • @LoucosDoMetro
      @LoucosDoMetro 9 місяців тому

      @@M.Id404 :Not a problem. Glad it helped.

    • @Catm7789
      @Catm7789 2 місяці тому

      Bro you are a lifesaver I spent like half an hour angry at my pc bc unity kept telling me that I couldn't give the player model one of the scripts cus of a compile error and the entire issue was because of a missing reference bc name was wrong

  • @IcyR-_-R
    @IcyR-_-R 3 місяці тому +1

    People using later versions :
    The 2D Vector is renamed to
    Up/Right/Left/Down Composite in later updates

  • @BardekDardleYT
    @BardekDardleYT 11 місяців тому +5

    hey can somebody help with this error that I got from the tutorial: Assets/Scripts/InputManager.cs(11,13): error CS0246: The type or namespace name 'PlayerLook' could not be found (are you missing a using directive or an assembly reference?)

    • @Sleepp3939
      @Sleepp3939 11 місяців тому +2

      Same

    • @lukehirst7154
      @lukehirst7154 2 місяці тому

      This error usually means that the new script created for PlayerLook is still named 'NewBehaviourScript'. If you look at the public class declaration within Visual Studio you will need to make sure that the class itself is called PlayerLook and that the file is also named PlayerLook in the file explorer (via file directory).
      I also had an issue where the struct OnFootActions was not being updated with the Look action once I added this in the Unity editor. To fix this issue I had to right click on the PlayerInput tab within the Unity editor and then click 'UI Toolkit Live Reload' and this appeared to recompile the scripts and update the struct object definition within Visual Studio.

  • @JohnGavrilides
    @JohnGavrilides Рік тому +4

    Just finished the playermotor and input manager scripts and im getting an error that says "PlayerInput.OnFootActions' does not contain a definition for 'Movement' and no accessible extension method 'Movement' accepting a first argument of type 'PlayerInput.OnFootActions' could be found (are you missing a using directive or an assembly reference?)" help plz

    • @villheimog
      @villheimog Рік тому +1

      Same exact issue...

    • @Crankypanst
      @Crankypanst 4 місяці тому

      same

    • @4king44
      @4king44 3 місяці тому

      You should name the C# class of the input system you created before. Click on the inputSystem file and then in the inspector enter "PlayerInput" as the class name. Now you should have a reference.

    • @Никто-777-е3х
      @Никто-777-е3х 28 днів тому

      Check the Spelling in the PlayerInput you have written wrong spelling of Onfoot or Movement. Check it comrade it should have a spelling mistake.

  • @fireCloud_fc
    @fireCloud_fc 4 місяці тому +1

    For anyone using unity 6 preview keep in mind that for the 2d vector composite its going to be under action properties got to change type to value and control type to vector 2 then u can right click add up/down ect composite!

    • @beefjerkybros
      @beefjerkybros 3 місяці тому

      Thanks! I made it to the input actions part, and I remembered your comment about vector 2s, and turns out it was the fix!

    • @fireCloud_fc
      @fireCloud_fc 3 місяці тому +1

      @@beefjerkybros 👍glad i could help

  • @MeCroc
    @MeCroc 2 роки тому +8

    Hold on.. HOLD ON, THIS IS AN ACTUAL GOOD TUTORIAL!!!

  • @realisticlyunavailable8355
    @realisticlyunavailable8355 2 роки тому +6

    Hey, thanks for the tutorial!
    I'm trying to wrap my head around the new Input system so this video is very useful. It also allowed me to try out the character controller for the first time ever.
    I just have a quick question at 10:45, why did you use transform.TransformDirection()? what does it do since the code works just well by just passing in moveDirection.

    • @NattyGameDev
      @NattyGameDev  2 роки тому +11

      So what TransformDirection is doing is converting our input to local space for our player...
      So pushing [W] will always move our player in the own "forward" facing direction
      If you just used moveDirection however..
      [W] will always move our player forward in the Z axis/ [S] back on the Z Axis
      [A] forward on the X axis/ [D] back on the X axis...
      The direction we move would be fixed in world space.. Which is great for a top-down game.
      Hope that makes sense!! :D

  • @Vera_Noctis
    @Vera_Noctis 3 місяці тому

    love the movement, good explaining and video, + 1 subscriber

  • @andevy1
    @andevy1 Рік тому +4

    Assets\New Folder\InputManager.cs(9,25): error CS0426: The type name 'OnFootActions' does not exist in the type 'PlayerInput'
    how would you fix this error

    • @floredadcorazon
      @floredadcorazon Рік тому +1

      I have the same problem, have you ever figured out what to change? (if you did, please tell me how,thanks :D)

    • @slaffka2713
      @slaffka2713 10 місяців тому +1

      @@floredadcorazon may be you figured it out? I have the same problem and don't know what to do 😭😭😭

    • @LilyZigzagoon
      @LilyZigzagoon 4 місяці тому

      Did yall ever figure it out

  • @scpfsite-1241
    @scpfsite-1241 2 роки тому +4

    I keep getting errors stating "Playerinput.OnFootActions does not have a definition for movement" please help.

    • @coding_game
      @coding_game 2 роки тому

      same problem😔

    • @Alice58302
      @Alice58302 Рік тому

      @@coding_game look into your input manager thing where you wrote did the aswd/left stick, it might just be that you just misrwrote onfoot or movement there

  • @dlordyt
    @dlordyt Рік тому

    Bro you are one of the best tutors of unity I have ever find on UA-cam

  • @JoJo-yk2vc
    @JoJo-yk2vc 9 місяців тому +6

    how to add a 2d vector composite to the action movement 3:49 im seeing this in 2024 so probably versions are too different

    • @alegatta79
      @alegatta79 8 місяців тому

      For those who couldn't find 2D vector binding: you have to select your action (Movement) and change action type to value and control type to Vector 2. credit: @eminkilicaslan8945

    • @OliversaurusDEV
      @OliversaurusDEV 6 місяців тому

      Just use the up/down/left/right composite

  • @BingBoyBongo
    @BingBoyBongo 3 роки тому +11

    Can you jump while you're actually on the object or does that come later? Love this tutorial by the way, keep this series going!

    • @NattyGameDev
      @NattyGameDev  3 роки тому +6

      Yeah absolutely ! Since we're using the IsGrounded book from unitys character controller it will set the bool to true when we are on-top of any type of collider, but we do need assign it to our own isGrounded bool in update to get reliable results.

  • @ryanavent1
    @ryanavent1 11 місяців тому

    For anyone else who is wondering how to make the look speed on gamepad the same as the mouse, Back in the PlayerInput (input Actions) against the Look > Right Stick [Gamepad] select add against Processors and select Scale Vector 2, set x and y to 3 this seems to be about the same as the default movement for keyboard.

    • @FreakoNek
      @FreakoNek 8 місяців тому +1

      thanks mate, making a game for my brother and he doesnt really know WASD that well, so im making sure these controller controls are perfect

  • @jesper2762
    @jesper2762 2 роки тому +4

    My W and S key just makes my character go up and down and not forwards and backwards, any tips on how to fix?

    • @Daddy_Moose_Gaming
      @Daddy_Moose_Gaming 7 місяців тому +2

      I realize this is over a year old, but this may help someone else.
      What you most likely have written:
      moveDirection.x = input.x;
      moveDirection.y = input.y;
      What is should be:
      moveDirection.x = input.x;
      moveDirection.z = input.y;
      The moveDirection.z is what moves you left and right, I made the same mistake when flying through the tutorial. Lol Hope this helps!

  • @MalcolmEkajja
    @MalcolmEkajja 2 роки тому +1

    Nice video. Very easy to understand and follow. Underated UA-camr for sure

  • @OliverAhoranta
    @OliverAhoranta 3 місяці тому +3

    bruh i dont have the same code in the c# folder 7:39

  • @shahzilahmad1043
    @shahzilahmad1043 2 роки тому +9

    Hello!
    Great Video. But Im experiencing this problem:
    error: CS0426: The type name ‘OnFootActions’ does not exist in the type ‘PlayerInput’
    “OnFootActions” is also underlined Red when I type “PlayerInput.OnFootActions”
    8:06

    • @ndprod7834
      @ndprod7834 2 роки тому +2

      save the onfoot look action asset

    • @vipereaper
      @vipereaper 2 роки тому

      Make sure the i in "Playerinput" is lowercase

    • @piotrk1584
      @piotrk1584 2 роки тому

      p not i

    • @inproduction7605
      @inproduction7605 2 роки тому

      same issue for me its very annoying

    • @LucasDevWeb
      @LucasDevWeb 2 роки тому +1

      Hello, I hope I can help you and that you have not abandoned this. Doing a search in my files I discovered that my script was called Player Input Actions and not as it says in the video Player Input. Hope this can help you!

  • @x3-nf3ce
    @x3-nf3ce 9 місяців тому

    A really thorough tutorial, super easy to follow!

    • @masala568
      @masala568 7 місяців тому +1

      @jinx_gt i literally cant find the context for why you said this but it fixed my problem, thank you.

  • @Alstun
    @Alstun 2 роки тому +5

    For some reason I cannot jump. The script has 0 errors, but when I hit space it doesn’t do anything

    • @Mission.marketing.2022
      @Mission.marketing.2022 2 роки тому

      I have the same issue

    • @panachedhallchannel1635
      @panachedhallchannel1635 2 роки тому

      Are you sure you put it in the right area or the right folder

    • @Alstun
      @Alstun 2 роки тому

      @@panachedhallchannel1635 yes

    • @panachedhallchannel1635
      @panachedhallchannel1635 2 роки тому

      @@Alstun try rewatching the video maybe you missed the code

    • @JamBudds
      @JamBudds 6 місяців тому

      I'm so glad no one actually helped you cause I'm pretty sure it has something to do with the player not knowing they're on the ground
      But I can't for the life of me figure out how to change that

  • @ItsCreateTime
    @ItsCreateTime 2 роки тому +4

    I cant add 2D vector in action map

    • @DominikSzatmari
      @DominikSzatmari Рік тому

      So with the Movement action Selected:
      - In the the Properties tab
      - Change the 'Action Type' to Value
      - Change the 'Control Type' to Vector 2
      Now you will be able to right click on the Movement action and Add an Up/Down/Left/Right Composite!
      Hope this helps! 😃

  • @terrarianezt4180
    @terrarianezt4180 Рік тому

    this was so, so helpful, thank you! i had no idea how to make movement and combat in my game!

  • @Stargazer10255
    @Stargazer10255 Рік тому

    Thanks a lot for the tutorial, btw, mad respect for the wallpaper, Outer Wilds is my favorite game ever

  • @KyleWithAnM69
    @KyleWithAnM69 Рік тому +3

    Isn't applying a constant downward force in update method very taxing? Can't we just assign all that in a pre-check before we hit the jump input key. I'm still learning so sorry if this is a dumb question.

    • @PrimeCommand
      @PrimeCommand 11 місяців тому

      if you were to walk of an edge you would just float if that were the case I believe

  • @TrenchKoatKilla
    @TrenchKoatKilla Рік тому +3

    How do i open the input manager code thing 7:34. Im very new to coding and stuff and i dont know how.

  • @thelaughtrack646
    @thelaughtrack646 25 днів тому

    The math calculating the rotation is quite literally calculating the change in the angle on a specified axis per frame. If you do the math, at full mouse movement (represented as an input of 1 or -1, depending on the direction) and assuming you're at 60 frames per second, your rotation angle should change by .5 per frame, which when multiplied by 60 frames means that each second you rotate along a given axis by 30 degrees, which perfectly lines up with the sensitivity as it should. So in that sense the sensitivity variable truly tells you how much the given angle should change per second.

  • @paccoastaviation
    @paccoastaviation 2 роки тому +3

    Hey, thanks for the awsome video, one thing. When i use the input actions for w/s, instead of moving me along the z axis, it moves me along the y. Any help appreciated. (Beginner)

  • @blox2991
    @blox2991 3 роки тому +4

    quick question, when I try to add my PlayerMotor and InputManager scripts into the player object, it says "Please fix compile errors before adding component". How do I fix this?

    • @chriswizardman6384
      @chriswizardman6384 2 роки тому

      same here

    • @StanTxc
      @StanTxc 2 роки тому

      same with me @Natty Creations help us out you are the God of Code

    • @StanTxc
      @StanTxc 2 роки тому

      Now i got this error "Assets\Scripts\PlayerMotor.cs(26,33): error CS1061: 'Vector2' does not contain a definition for 'z' and no accessible extension method 'z' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?)" do you have any idea how to fix this ?

    • @chriswizardman6384
      @chriswizardman6384 2 роки тому +1

      @@StanTxc the only thing I could advise you to do is rewrite the entire thing or check again for errors but I assume you have already done that

    • @StanTxc
      @StanTxc 2 роки тому

      @@chriswizardman6384 yes i did and it turns out i wrote ''z'' instead of ''y''

  • @burajirunokusodesu
    @burajirunokusodesu 2 місяці тому

    for the sake of commenting, when it gets down to classes and obs it gets a little fussy, but practice shows its path to perfection (bout lowercase UPPERCASE)

    • @diksez7883
      @diksez7883 2 місяці тому

      Yo can u help me? I got an error but I did exactly what he did soo idk what's the prob

  • @mrmoon3592
    @mrmoon3592 2 роки тому +4

    at 4:00 i can't find 2D vector

    • @Arik6952
      @Arik6952 4 місяці тому

      change your movement action type to "value" and control type to "vector 2"😊
      (Action Proporties)
      Then right-click on movement and choose Add Up\down\left
      ight composite
      Thanks for Creative_Divide9845 for answer

    • @Annoyedfroggy-BS
      @Annoyedfroggy-BS 4 місяці тому

      @@Arik6952how do i change it to value

  • @gumtree69_
    @gumtree69_ Рік тому +3

    No 2d vector for movement 3:43

  • @milome4223
    @milome4223 Рік тому

    Fantastic tutorial, everything step-by-step. Got crouch and sprint working, and thanks to the comments here, got the press and release working, so much better than toggle on, toggle off.
    Changed the jump height to 0.5 to be more realistic.
    Looking forward to part 2.

  • @JaketheMotorhead
    @JaketheMotorhead 2 роки тому +4

    I have an issue where it says: Assets\Scripts\InputManager.cs(23,34): error CS1061: 'PlayerInput.OnFootActions' does not contain a definition for 'Movement' and no accessible extension method 'Movement' accepting a first argument of type 'PlayerInput.OnFootActions' could be found (are you missing a using directive or an assembly reference?)

    • @ffpatt5457
      @ffpatt5457 2 роки тому +4

      my OnFootActions says its not even found in the input manager /:

  • @Legobuilder-yp8ig
    @Legobuilder-yp8ig 2 роки тому +5

    I first had a problem with the camera couse it wasn't smooth when you look around it was more like stocking but I fixed it I just had to change in the PlayerLook Script the xRotatin wich was on -80, 80f and I just changed it to -100, 100f and now it's smooth 😃👍

    • @xenoniccinema7862
      @xenoniccinema7862 2 роки тому

      I had a different problem but changing it to -100 100 fixed it, THANK YOU SO MUCH

  • @mrsascpt
    @mrsascpt 10 місяців тому

    Awesome video. Straight to the point.

  • @ImInzaine
    @ImInzaine Рік тому +3

    This tutorial is so good that it didn’t work and wasted 4 hours of my day just to make me so angry i nearly broke my computer
    Thanks

    • @benen8721
      @benen8721 Рік тому +1

      Works perfectly fine for everybody else.