Godot 4.X : Ultimate First Person Controller Tutorial Part 3 ( 2023 )

Поділитися
Вставка
  • Опубліковано 24 сер 2024
  • Consider a Subscription
    Part 1 : • Godot 4.X : Ultimate ...
    Part 2 : • Godot 4.X : Ultimate ...
    Assets : github.com/luk...
    Kenney : www.kenney.nl/
    Poly haven : polyhaven.com/...
    This is part 3 of a 3 part fps contoller tutorial series!

КОМЕНТАРІ • 123

  • @mimadm4832
    @mimadm4832 Рік тому +84

    Bro got me bricked up, thank you for these tutorials, I for once understand what I am writing as I follow along instead of copy pasting it!

    • @comradechonky6328
      @comradechonky6328 9 місяців тому +14

      bro wtf💀

    • @youforgotthelinkinthedescr6798
      @youforgotthelinkinthedescr6798 7 місяців тому +6

      What do you mean?
      What did you mean by this?

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

      @@youforgotthelinkinthedescr6798 bto how he teaches geniunely made me excited

    • @IlluminatiJoeCrusade
      @IlluminatiJoeCrusade 7 місяців тому +3

      @@youforgotthelinkinthedescr6798 I think he like bricked him up in the sense that the bricks are knowledge and he is bricking up the wall like building knowledge, yk

    • @Phosphor_screen.
      @Phosphor_screen. 6 місяців тому +3

      No hes hard@@IlluminatiJoeCrusade

  • @eivisch
    @eivisch Рік тому +10

    a heckin love godot 4 fps tutorials

  • @davidphillips9366
    @davidphillips9366 Рік тому +16

    These are the most in depth and best explained fps controller tutorials I've seen for Godot, great job! One feature that would be nice is to make it where you didn't have to hit the crouch and spring buttons at the exact same time to enter a roll. If there was a short period between sprinting and hitting crouch that you could still enter a slide I think sliding would be a lot smoother. Like a "coyote time" but for sliding

    • @Yoni123
      @Yoni123 6 місяців тому +1

      Were you able to add this?

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

      Another thing I thought of would be just an alternate way to sprint, like double tapping forward in quick successions (like in Minecraft)
      Because yeah, it's kind of a mess to press both, but there's always solutions and maybe depending on what you want to do, even Shift as a toggle instead would be neat. So ON or OFF when pressed

  • @AzidHouse
    @AzidHouse 10 місяців тому +7

    Thank you. Keep up the good work! (Come on lads, let's support this brilliant guy)

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

      🙏 will do, more stuff in the works as we speak !

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

    Woop!
    Not sure if it's planned or not, but ledge grabbing would be a cool addition also. As in when jumping towards a ledge but hitting it around camera height, you can hang there and either jump up (or away from the wall) or drop down.
    I've implemented something similar myself but have a odd bug that happens every once in a while where my character gets lifted up a meter or two when ledge grabbing!
    Awesome work so far btw!

  • @Alander787
    @Alander787 11 місяців тому +6

    This channel is going to be huge in the future! Keep up the great work. Once I have enough free time, I'm gonna dive through your videos and try to make something myself. Thank you for your great content!

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

    Thanks for the awesome tutorials and how they're pretty modular so you can skip over features you don't want to implement etc.. What I'd really appreciate is a tutorial on adding the ability to walk up steps/stairs without the need for a ramp, and to have it changeable with a step height variable.

    • @HappyCucco.
      @HappyCucco. 24 дні тому

      This, then it would rly be ultimate!

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

    looking forward to the next videos!

  • @GodSahil
    @GodSahil 7 місяців тому +4

    please don't discontinue this series here, i want you to create a tutorial on animations in 3d and making 3d models like guns and hands please!!!

  • @davidphillips9366
    @davidphillips9366 11 місяців тому +8

    Here are a few ideas for possible features. I wouldn't expect all of them to get added but thought each of them might add value to the controller:
    - Wall run
    - Wall jump
    - Coyote Time
    - Double Jump
    - Grappling Hook
    Something that I'd love to learn is how you could create a system to unlock some of these abilities through progression instead of the character starting with all of them.

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

      omg u read my mind i was about comment those

    • @RealKipper1324
      @RealKipper1324 8 місяців тому +2

      I accidentally gave my character coyote time, here's how I did it
      I had a variable named 'airTime', which ticks up whenever is_on_floor is false
      Where the program handles jumping, I replaced the "and is_on_floor" with "and airTime < 0.2"
      This means if the player has been in the air for less than 0.2 seconds, they can still jump, thus creating coyote time
      Hope that helps

    • @IlluminatiJoeCrusade
      @IlluminatiJoeCrusade 7 місяців тому +3

      For the unlock you can do a global script containing variable flags of the unlocked abilities. Then put the function of the ability under an if statement like "if [global_ability_flag]: ability)". That's how I'd do it

  • @ecookgraphisme
    @ecookgraphisme 11 місяців тому +4

    Great tutorial, exactly what i needed! Thanks a lot.
    I twist a few things at the end, but the major thing I rework was the sliding mechanics.
    I find it better (for my taste of course) if it's based on speed more than on a timer.
    So now, you can slide if your speed is better than walking speed.
    If you release crouching button, you slide stop immediatly (not only with a jump).
    And if you keep crouching until the end, sliding stops when you reach crouching speed. It feels more natural to me like this.
    Also, If you're free looking while sliding, at the end of the slide, you go to that direction. I don't reset the neck, but I adjust the body to follow the neck. I'm not sure it will feel natural in game, but in this little scene it feels again more natural to me.
    Again thanks for the great tutorial, perfect speed, and level of explaination for me. I'll dig a little more your channel and I can't wait for new videos 🙌

    • @tylercarr1536
      @tylercarr1536 11 місяців тому +1

      How exactly did you get the player to go in the direction of the camera after the slide is over? I don't really like how it snaps back to going forward, seems very unnatural. I've tried a couple of things but haven't nailed it down. Thanks for any help!

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

      @@tylercarr1536 at the end of the slide, I simply rotate the player to the neck rotation "rotate_y(neck.rotation.y)" and reset the neck rotation "neck.rotation.y = 0.0" I think this should be enough. But I changed a lot the slide mechanic so i'm not sure. Tell me if this works !

    • @NickoTyn
      @NickoTyn 11 місяців тому +1

      These were exactly the modifications I did too. It feels a lot better in my opinion too.

    • @user-pz9ju6ss7r
      @user-pz9ju6ss7r 4 місяці тому

      Thank you! this is an interesting approach

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

    If you want to add camera tilt when moving left or right try using this (This works for me, though I just started using godot so if anything seems wrong or redundant please tell me)
    #this is the amount of degrees that the camera will tilt by
    var CameraTiltLeft = 5
    var CameraTiltRight = -5
    var Lerp_Speed = 6
    @onready var Head = $Head
    @onready var Camera = $Head/Camera3D
    #Camera Tilt Left and Right
    if Input.is_action_pressed("Left"):
    Camera.rotation.z = lerp(Camera.rotation.z, deg_to_rad(CameraTiltLeft), delta * Lerp_Speed)
    else:
    Camera.rotation.z = lerp(Camera.rotation.z, deg_to_rad(0), delta * Lerp_Speed)
    if Input.is_action_pressed("Right"):
    Camera.rotation.z = lerp(Camera.rotation.z, deg_to_rad(CameraTiltRight), delta * Lerp_Speed)
    else:
    Camera.rotation.z = lerp(Camera.rotation.z, deg_to_rad(0), delta * Lerp_Speed)

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

      Works well enough; though it seems like it does conflict with landing and rolling animations so maybe it might be better to animate the camera itself instead/ or add a check; though for some people you might need to change "camera" to lower case as well as making "left" or "right" lowercase as well for this to work (also @onready won't be needed, as it's already covered in the tutorial)

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

    Best Godot tutorials!

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

    Good timing ! Thanks for the part 3 :)

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

    I've been waiting with baited breath for this! Thank you for the awesome tutorials, you are my favorite youtuber for Godot 4!!!!

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

    You...are...amazing.

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

    These are amazing! I've learned so much by just following along and fidgeting with the values. Nicely explained, straight to the point and with a lot of content. Keep these up please! I'm loving your channel.

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

    You've helped us write a feature-packed and scalable fps controller. Incredibly high quality content, thank you so much!

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

    thank you bro these tutorials are easy to follow and like others have said I can actually understand what you are saying, you are great at these tutorials keep it up

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

    I suggest make some tutorials about 2d Character fighting and programming, cutscene camera movement

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

    These tutorials are great! Can't wait for the requested features. :)

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

    This was an amazing introduction to godot! Thank you a lot

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

    amazing tutorial series, thank you very much!

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

    thanks a lot brother !!!

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

    Thanks for this series, it is excellent!

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

    Thanks for this series

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

    Great series! Very clear explanations !

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

    muchas gracias bro, llegarás muy lejos con ese conocimiento. me ayudó bastante a entender mucho más las herramientas y script de godot.✌⚡

  • @user-nc9on4bp2o
    @user-nc9on4bp2o 11 місяців тому

    Excellent work. Perfect video. 10/10.

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

    One issue i've noticed is if you slide and jump cancel the slide while under object that prevents you from uncrouching you keep the speed you had from the slide when you cancelled. So it allows you to walk around crouched under the object at full speed if the slide is cancled right after you slide under the object

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

      I found a fix, if you make a new var named "jump_cancel" set it to false, and just set it to true when the ray_caster_3d is colliding then make a func that sets the current speed to lerp towards the crouching speed.And just make sure to set jump_cancel to false again once another slide it started

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

    "future tutorials"

  • @informatiqueisfutur-ve2ro
    @informatiqueisfutur-ve2ro Місяць тому +1

    can you make a wallrun / walljump tutorial just like karlson but in godot 4

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

    This is a great series. But rather than fancy slides and stuff, I'd just like to request info on how to handle stairs and other small ledges

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

    Man, amazing videos! Thanks ü so much❤️

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

    Very very good tutorial, keep it up

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

    Perfection, Lukky.

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

    thank you for the great tutorials you really helpem me out

  • @FatoGato_
    @FatoGato_ 11 місяців тому +1

    great tutorial. could you please show us how to add sound

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

    phenomenal tutorial,, if you don't want to your code to be completely unreadable afterwards 😅
    still helps me with getting started though

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

    Please add hands

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

      Yes, Hand Look realistic

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

      You add hands.

    • @lukky.
      @lukky.  Рік тому +3

      I already have a full tutorial on first person hands and animation right here ! ua-cam.com/video/a3GjUyBDwe4/v-deo.htmlsi=T4liOlSazoveDog7

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

    Hey lukky can you make a vaulting/wall running tutorial I would really appreciate it.....

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

    This is best movement tutorial

  • @Snapper-gaming
    @Snapper-gaming 6 місяців тому

    Instead of lerping current_speed everywhere, you can just lerp velocity.x and z. I have made an acecleration and deceleration variable.

  • @Z1RRO-nl1ej
    @Z1RRO-nl1ej 6 місяців тому

    This is really amazing tutorial, but you missed one thing that I want to do - how we actually can set cooldown to slide, so you can't just slide forever?

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

    good stuff

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

    Dunno if it was suggested, but I've never seen a good swimming FPS controller in godot, when I was working on my game back in the 3.5 days that's where I got hung up, because I couldn't come up with a way to do it without a bunch of extra logic that made every body of water I added a huge pain.

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

    I'd love to see a full body first person controller tutorial.

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

    Cool

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

    I think the roll animation looks a little better with z rotation so it looks like you are rolling over your shoulder instead of front-flipping on a banana peel

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

    Thanks you a lot !

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

    Awesome series, can you add a FSM to the controller :D

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

    It would be nice If you could iterate on this code to add support for: climbing & vaulting of walls, vertical ladders climbing, slopes & stairs walking, full character support (see your body!), holding and changing weapons (melee, firearms, etc.), aiming

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

    i hope interaction my come up soon i really need a tutorial on it, something like grabbing items and dropping and opening/closing doors, and keys interreacting with keylocks

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

    Bro could you upload a fourth video where you put the code in a state machine

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

    Is there anyway we can contribute financially to this series of tutorials to help you getting motivated when you have time to allow to it? I have ADD and I very appreciate your pedagogy, the way you structure your videos and your explanations.

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

    These tutorials are amazing. I'm an experienced professional developer looking at swtiching to Godot (not because of the recent Unity controversy, despite the timing! 🙂) But I have run into problems with the sliding feature in Part Two. If I just tap the crouch button I slide, but stand up again while doing it, which doesn't feel right. Perhaps I'm just not understanding the controls properly?
    Anyway, would it be possible to post your finished code so I can diff it with mine to see where I've gone wrong?
    Thanks, including thanks for the brillliant tutorials. You've made the transition to the Godot API so much easier.

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

    While I think this is good, there has to be a better way to implement the look feature. You should be able to control the camera without having to have a head and neck.

    • @user-pz9ju6ss7r
      @user-pz9ju6ss7r 4 місяці тому

      For simple controls, a character and a camera are enough, but it’s impossible to create a free look without an additional child element

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

    best tut

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

    Can you add Wall Running, wall jumping, bhopping and grappling like Dani in Unity in a extra tutorial

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

    Thanks for your great videos which pushed my learning curve a lot!
    Just two points: It would be nice if you could speak a bit more clear and louder. And the other is: Why are you never publishing the sources of your tutorials on github? Thanks, Patrick

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

    If I want to further develop this I should probably make Player it's own scene?

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

    Add press to V and we change to third person

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

    how do you make the slide not stop if the player is moving downhill?

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

    Will you be adding attacks (melee and projectiles)?

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

    Thank you for a great tutorial! Is there any git repo with final result? I much more prefer to watch the tutorial, understand it and then play and tweak the code instead of jsut blindly trying to copy what you are doing.. Anywas, awesome controller and explanaitons. Thnx

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

    how to we add sounds ? in animation ?

  • @P.R.P_is_better
    @P.R.P_is_better 7 місяців тому +1

    how would i convert the code to a state machine?

    • @asdfghjkl-jk6mu
      @asdfghjkl-jk6mu 6 місяців тому

      please learn to do some things yourself. it'll make you a better programmer

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

    Great tutorial! Thank you. Seems that would eventually get to an overflow state, no? Nothing to reset it or clamp it.

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

      It would probably take decades of the game running nonstop though.

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

    my slide keeps making me slide backwards do u know how to fix it

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

    Anyone know how to fix being stuck in crouch when crouching when using Jolt physics?

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

    After my roll goes forwards, it automatically resets me back to the default position tweening and it looks weird. How can I fix this?

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

    When I slide my player keeps sliding and doesn't stop can someone help me with this?

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

    Curious if anyone here has an answer:
    When sliding, if you release the crouch key you will "stand up" while still sliding. Did I miss something in the previous video, or was it just an unnoticed bug?

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

    for some reason, my sliding gets inverted some times and i cant change it xd i slide backwards while sprinting forward and forwards when i slide backwards. it seem to happen randomly

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

    Any reason for not using a State machine ? StayAtHomeDev uses one but men, I'm lost in his tutorial

    • @asdfghjkl-jk6mu
      @asdfghjkl-jk6mu 6 місяців тому +1

      probably because that would make the tutorials too long. stayathomedev has horrible code anyway lol

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

    can you please help me with slide cancelling with the crouch

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

    Followed pretty much everything (minus sliding) and currently trying to figure out how to stop headbobbing whenever the player is idle. Is there something I missed?

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

    when I try to add the jump animations they end up really choppy for some reason. anyone know what I'm doing wrong here?

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

    Hi Lukky. I'm puzzled for the 3rd day... The landing animation at the end of a jump works until you start moving - if you press WSAD, the "landing" animation stops playing.... print(last_velocity.y) stops displaying in the Debugging process window...
    What can be the matter? Please, give me a hint

  • @minxfractor
    @minxfractor 13 днів тому

    Can I use it in my game?😅

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

    Hi ive been watching your videos and following along and the code i do doesn't work could you put the code in the github link you sent?

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

    can I get the project download

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

    Unity dev here. Just wondering if Godot supports camera stacking? Camera one renders only the player hands/weapon, camera two renders everything else. Then you render camera one's output over camera two's output to not see weapons clipping through walls and stuff (even of they in fact are phisically clipping it won't be visible)?

    • @scotmcpherson
      @scotmcpherson 11 місяців тому +1

      Well I know you can have a display of a second camera in scene...I,e, like a security camera looking at the player and displaying it on a monitor in game...so I can't see any reason you couldn't stack camera images one for the player, and one for his readied gear.

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

    How is this working with stairs?

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

    How would I implement footstep sounds in to this?

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

    ¿Third person controller part 2?

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

    bro, I want to make a game like this, but my GPU is only an Intel HD 4000, is there any hope of being able to ?

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

    hey, how would you go about adding controller support to the movement code?

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

      I'm have a fps controles for controler video in the works. Movement is as easy as adding your joystick to the input map. For looking your are going to have to write a little bit of logic in the process function checking for the joystick direction and moving the head accordingly

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

    I can hit the sprint button mid air and it makes me move further in the air. Any easy way to disable this? thanks

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

      I added "if is_on_floor():" above "if Input.is_action_pressed("sprint"):" and this resolved my issue if anyone else is curious.

  • @AkramAoun-y7y
    @AkramAoun-y7y 12 днів тому

    a cod plz

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

    Bhai code kaha hai

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

    Bro please give us full code in middle the code is getting wrong please help me fast

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

    Great tutorials, please make more! I am very new to coding but was still able to patch an odd minor detail here and there thanks to your explanations.
    When sprint jumping, how do I maintain horizontal speed of jump even if player stops holding sprint while mid?