Тёмный

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

Lukky
Подписаться 36 тыс.
Просмотров 138 тыс.
50% 1

Consider a Subscription
Assets : github.com/lukky-nl/FPS-contr...
Kenney : www.kenney.nl/
Poly haven : polyhaven.com/hdris
This is part 1 of a 3 part fps contoller tutorial series!

Опубликовано:

 

3 авг 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 308   
@Adamthegeek70
@Adamthegeek70 8 месяцев назад
12:50 All caps = constant variable. Lower case is local (in method or a parameter) and an '_' usually means private to module/class scope, and starts with a capital letter is public. so at glance of the code you know what are constants and/or what the scope of a variable is. Might be nerd-splaining here but I have watched this excellent video like 5 times now and I am translating it to C#. And I just thought I would point it out. :)
@Asonc1
@Asonc1 6 месяцев назад
tip : can add this to close the project with ESC button instead of ALT+F4 / ALT+TAB, 1) add input "quit" in input_map and bind it to ESC 2)add this : func _process(delta): if Input.is_action_just_pressed("quit"): get_tree().quit()
@TheInfiniteAmo
@TheInfiniteAmo 5 месяцев назад
You have no idea how insanely useful this is for workflow on a single monitor setup. Or maybe you do. Either way thanks.
@Asonc1
@Asonc1 5 месяцев назад
@@TheInfiniteAmo np and good luck !
@gderuki
@gderuki 4 месяца назад
OR press F8 key when running project from Godot editor ;-)
@Asonc1
@Asonc1 4 месяца назад
or use hotkey system changer program to unbind ESC and bind F8 it to it with an algorithm that would change it back by reverse doing what it does when you click certain shortcut with admin approval before 2 am, also it requires you to fill 3 enctype php triple coded in 32Bytes passwords and they all need to match from randomly generated text while you sing opera live, but worry not, it will have subway surfer at the side bar
@clock_work1
@clock_work1 4 месяца назад
doesn't need to be _process(delta) function, it might be more optimised if it was in the func _input(event)
@NotLordAsshat
@NotLordAsshat 6 месяцев назад
Tip: Wanna change all instances of a variable in a script to a different name? "Ctrl + r" brings up "find and replace." Type the current name in the top and the new name in the bottom. Be mindful of if other things contain the character/word you're replacing.
@mihran7785
@mihran7785 11 месяцев назад
Honestly, you're the best tutorial channel I've ever come across. thanks for everything
@lukky.
@lukky. 11 месяцев назад
Thanks for the kind words ! :)
@santivalencia8813
@santivalencia8813 10 месяцев назад
Try clear code he has nice tuts as well
@zarbon6319
@zarbon6319 6 месяцев назад
agreed , the only channel i found explaining of godot was clear
@westingtyler2
@westingtyler2 9 месяцев назад
now due to the Unity to Godot exodus we need a good "Every Godot 4 Node Explained video."
@BINGUS--
@BINGUS-- 8 месяцев назад
That would take like 1000 hours to finish If he tries to explain it Withall of its functions
@westingtyler2
@westingtyler2 8 месяцев назад
you can give an overview of anything in 30 seconds, just a brief one. 30 seconds per node would be super helpful for absolute beginniners. remember there's no such thing as a complicated topic, only a complicated explanation. the "topic explain in five levels of difficulty" videos is the style I'm thinking. - kingdergarten level. @@BINGUS--
@lukky.
@lukky. 8 месяцев назад
That's a great idea!
@Cairdymakes
@Cairdymakes 8 месяцев назад
Lukky's got a video for every node. Pretty high level but helpful as a starter.
@SpazeOfficial
@SpazeOfficial 2 месяца назад
So this is the comment resposible for the best youtube series on youtube
@AJMarraffa
@AJMarraffa 9 месяцев назад
This one tutorial contains stuff I had to dig for in lots of separate tutorials over a lot of time when making a character controller in Unity. So good! Thank you!!
@auxiliaryboxes
@auxiliaryboxes 9 месяцев назад
Well done, this is exactly the kind of video I wanted for prototyping an FPS with Godot. Clean, to the point, easy to follow.
@_mickmccarthy
@_mickmccarthy 11 месяцев назад
Awesome! I've just jumped back into game dev after a few months so this has appeared at a very opportune moment!
@steffensensa
@steffensensa 5 месяцев назад
Very good clean tutorial, straight to the point. Exactly what I was looking for. Thank you for taking the time to make this.
@ChristopherYabsley
@ChristopherYabsley 7 месяцев назад
Clean and concise. Thanks for making this series.
@SunnyShuklathedoctor
@SunnyShuklathedoctor 6 месяцев назад
I'm only halfway across and already I am very into this. You are a natural, love this.
@akiftheafk
@akiftheafk 9 месяцев назад
Great tutorial to understand basics of Godot. Thanks!
@sealsharp
@sealsharp 9 месяцев назад
Helped me port my FpsController from Unity to Godot. Good work, sir!
@Motaz4k
@Motaz4k 9 месяцев назад
great work! loved the lerp stuff, it solved so many issues in my mind
@TuncTurel
@TuncTurel 9 месяцев назад
Thank you so much for this amazing tutorial! I followed it and wrote my C# version of your code and it works like a charm! I learned so much thanks to you.
@WoyaThePug
@WoyaThePug 5 месяцев назад
This was a phenomenal tutorial. Kept simple, demonstrated good practices by showcasing frequent testing at each step of the way, and keeping code clean. Also, this taught me that you could drag nodes into the script to create references for them, and that is extremely life-changing! I am eager to watch more of your tutorials, thank you for this service!
@Recals
@Recals 4 месяца назад
nice tutorial ! I came for the mouse look and got by the way everything else i wanted, thank you !
@blake_bates
@blake_bates 3 месяца назад
this is the best tutorial i could have come across, your teaching it exactly how teachers at my school would and explaining everything instead of cramming it into 10 minutes and editing it like a mr beast video. thank you
@spacecityryder
@spacecityryder 20 дней назад
Mr Beast + coding = 😡
@clarkey6695
@clarkey6695 Месяц назад
Incredible tutorial. Thank you
@Th3BadThing
@Th3BadThing 7 месяцев назад
Dude, thank you heaps. I needed a refresher so bad and this was perfect.
@blondinchik4563
@blondinchik4563 9 месяцев назад
Thanks for tutorial! It is very informative and without further ado!👍
@ebrahimkheder9629
@ebrahimkheder9629 11 месяцев назад
The greatest channel for learning godot ,TNX 🔥🔥
@llachim1
@llachim1 Месяц назад
Great tutorial! Thank you so much!
@ge-fe-st
@ge-fe-st 8 месяцев назад
Thanks! Really useful and detailed guide. You have talent😊
@isaacyauk2966
@isaacyauk2966 Месяц назад
I just followed your video verbatim and I got the exact result shown! Thanks so much for making a clear and understandable video that didn't rush, but took it's time to explain EVERYTHING. You just earned yourself a sub sir! GOOD WORK!!!!
@Avarage_degenerate
@Avarage_degenerate 6 месяцев назад
This is amazing, thank you man!
@devanmauch7843
@devanmauch7843 6 месяцев назад
Lukky you make everything so simple keep it up!
@XAHAK
@XAHAK 11 месяцев назад
big fan. ty for all the tutorials
@adzee8711
@adzee8711 11 месяцев назад
honestly your a life saver bro, i can understand everything your explaining witch helps me alot, especially since im currently developing a horror game for my school assignment, so this helps heaps and i cant wait for part 2 and 3 of this controller. Love the content bro keep it up
@carloszarate963
@carloszarate963 7 месяцев назад
A mi teniendo el mismo codigo ( menos por el sprint ) me glichea la colision, sabes porque?
@ToonLikeEpic
@ToonLikeEpic 5 месяцев назад
Most helpful tutorial for total beginners good work!
@sean7221
@sean7221 11 месяцев назад
Well done! Thank you!
@CTPELOK_U3_KPOKYCA
@CTPELOK_U3_KPOKYCA 7 месяцев назад
Awesome tutorial, thank you!
@manfriny_
@manfriny_ 10 месяцев назад
Top Demais!!!! Muito bom esse tutorial! Greetings from Brazil!
@gradman999
@gradman999 5 месяцев назад
Thanks for the tutorial!
@samuellangford6126
@samuellangford6126 9 месяцев назад
Thank you, your tutorial was the only one that worked.
@pointblankeloquence9578
@pointblankeloquence9578 4 месяца назад
Thank you so much! This is empowering :)
@akaLuckyEye_G
@akaLuckyEye_G 4 месяца назад
The bobcat gets me everytime. 10/10 desktop background. Thanks for a great tutorial.
@MTRFRK
@MTRFRK 5 месяцев назад
Absolutetly fantastic tutorial
@itsakram0
@itsakram0 3 месяца назад
thank you for this tutorial, I just found your channel and i like it, keep up the hardwork
@noahsoffian4050
@noahsoffian4050 6 месяцев назад
Amazing tutorial. Thank you so much.
@antoniocarvalho7031
@antoniocarvalho7031 10 месяцев назад
Amazing Work!
@tedTV_1
@tedTV_1 2 месяца назад
god send of a tutorial, thank you 🙏
@Seth_Walker
@Seth_Walker 6 месяцев назад
Thanks dude. I doubt I'll ever finish a game, but this is a good starting point.
@bitbutter
@bitbutter 9 месяцев назад
great series, im helping my son learn using these
@sashax2845
@sashax2845 2 месяца назад
Thank you very much! it works!!!
@DMG4yt
@DMG4yt 11 месяцев назад
you're a legend man 🔥🔥🔥🔥
@Afurai_
@Afurai_ 8 месяцев назад
After finishing this tutorial I have no idea why the sprint and crouch did not work for me initially (Godot 4.1.2 stable) but I figured out a solution; only changing some of the _physics_process(delta) code, I also fixed being able to spam crouch while underneath a surface, bugging out the crouching a bit if not fixed. I hope this helps anyone else having issues like I did! var canClick = true func _physics_process(delta): #Movement States #Crouching if Input.is_action_just_pressed("crouch") and canClick: currentSpeed = CROUCHING_SPEED head.position.y = lerp(head.position.y, 1.8 + crouchingDepth, delta * lerpSpeed) standing_collision_shape.disabled = true crouching_collision_shape.disabled = false canClick = false elif !ray_cast_3d.is_colliding(): #Standing if Input.is_action_just_released("crouch") and canClick: currentSpeed = WALKING_SPEED head.position.y = lerp(head.position.y, 1.8, delta * lerpSpeed) standing_collision_shape.disabled = false crouching_collision_shape.disabled = true canClick = false #Sprint / Walking if Input.is_action_just_pressed("sprint"): currentSpeed = SPRINTING_SPEED elif (Input.is_action_just_released("sprint")): currentSpeed = WALKING_SPEED canClick = true # Gravity
@fabianojeda3078
@fabianojeda3078 11 месяцев назад
Thanks brother, you are the very best
@funlabsdesignstudio
@funlabsdesignstudio 2 месяца назад
Thank You! Thank You! Thank You! Something I have always wanted to do and learn and because of your awesome video tutorials I am! Bless!
@Blobero
@Blobero 11 дней назад
THANK YOU!
@dynstinn
@dynstinn 9 месяцев назад
Best tutorial i have found so far, after this i was able to tweak and make my own code in GD script. while crouching you can still jump which causes the camera to clip into the ground, i fixed it by adding another raycast check to see if there is anything above us, if yes then we wont jump while crouching.
@AdelHaiba78
@AdelHaiba78 7 месяцев назад
Thank you, very helpful
@niels5036
@niels5036 10 месяцев назад
Amazing, almost as relaxing as Bob Ross to watch!
@s1ndrome117
@s1ndrome117 7 месяцев назад
Implemented parkour mechanics like vaulting, wall running, tic-tac, sliding and mantling all by myself just from watching this part alone, that's how good the explanation was!
@scotmcpherson
@scotmcpherson 9 месяцев назад
This is a great start to a 3d course, and I am looking forward to following the rest. Godot + GDScript is a bit different than Unity + C#. I have just one comment. By convention constants are typically ALLCAPS. It's a convention that is used so it's understood you are looking at a const value, and not looking at a variable and so that others that are reviewing your code are signaled that the value is a const. Sure you can go back to the header of the file where the values are cast and set, but this prevents it as a necessity. This convention is shared across most languages.
@ShVanesMusic
@ShVanesMusic 7 месяцев назад
Very important detail about the convention
@Rizzie95
@Rizzie95 7 месяцев назад
I just had the itch the other day to learn how to make a game. Found Godot to be the most welcoming engine for a complete newbie like myself. Following this video just makes too much sense as the very first thing to do and learn. Thank you for the information I can now absorb.
@entidadx1990
@entidadx1990 Месяц назад
great video help me a lot Thanks
@TheRealKaiProton
@TheRealKaiProton 6 месяцев назад
Im 10mins in and loving this video, Im not new to Godot, or programming in general, but I am new to 3d, so I really appreciate the pace and explanation of this video..
@lopsidedpolygon
@lopsidedpolygon 11 месяцев назад
Hey babe! Wake up! Lukky posted a new tutorial!!!! 💜🖤💜🖤
@lukabrasi001
@lukabrasi001 7 месяцев назад
this is a really good tutorial, your narration is very good. one thing i'd do is change the raycast to a shapecast to avoid standing up halfway inside objects though
@traumwelt1975
@traumwelt1975 Месяц назад
Thanks a lot for sharing your knowledge, i really like how you explain everything and test it step by step, that makes it easy to follow. oh and btw, you have a very nice voice ^^
@realMenta
@realMenta 9 месяцев назад
Thanks a lot dude.
@neikosar
@neikosar 7 месяцев назад
There's another way to manage the collision shape when player is crouching, instead of having two collision shape, you can take only one and change its scale and position on y axis. Nice tutorial! It helped me a lot!
@somavekony5436
@somavekony5436 8 месяцев назад
you are the best even tho i knew most of the stuff here it was still really helpful!!!!!!!!!
@GPEART1
@GPEART1 9 месяцев назад
This tutorial is WAY better than 2 other channels I tried doing the exact same kind of script, but both of theirs did not work, due to "path not found" errors and such, and no real explanation of half of the code. Thank You!
@user-iy8xx3hw6n
@user-iy8xx3hw6n 10 месяцев назад
thanks for the video, I think it's worth adding a ray_cast_3d check during the jump when the platform is overhead
@alan112223
@alan112223 9 месяцев назад
Stunning
@dusknone
@dusknone Месяц назад
A well made video
@basilhsxatzhkostas2800
@basilhsxatzhkostas2800 10 месяцев назад
Your video is amazing. You actually taught me so much and I am on the 31:00 min. Note I have 36+ hours in Godot as of writing this comment. I am not such a begineer. Well done with your video!
@bonsaipropaganda
@bonsaipropaganda 9 месяцев назад
sooo good thank you
@Theinvalidmusic
@Theinvalidmusic 10 месяцев назад
Couple of things I picked up on which may be useful to some people: - If you want to split your sprint function out and not have it inside your crouching behaviour, you can use boolean variables like 'is_crouching' to control whether sprinting is allowed, i.e. you can set 'is_crouching = true' when your character crouches, and then write if 'Input.is_action_pressed("sprint") and !is crouching:' when calling your sprinting code - If you don't want to use two separate colliders for crouching, you can modify your collider's height directly using collider.shape.height. The advantage with this is that the camera will follow the collider's relative height, and you can lerp between the two different heights for smooth transitions.
@uliveulearnandregret
@uliveulearnandregret 9 месяцев назад
to clarify on my issue more both of the if statements work fine however one of the speeds either crouch or sprint doesn't work if it's the 2nd if statement in physics process
@uliveulearnandregret
@uliveulearnandregret 9 месяцев назад
I have 2 is_action_pressed I came from roblox and generally the approach would be to have 2 different input action functions as I can interpret from your example
@uliveulearnandregret
@uliveulearnandregret 9 месяцев назад
if Input.is_action_pressed("Sprint") and IsCrouching: IsSprinting = true CurrentSpeed = SprintSpeed else: IsSprinting = false CurrentSpeed = WalkSpeed if Input.is_action_pressed("Crouch"): IsCrouching = true CurrentSpeed = CrouchSpeed else: IsCrouching = false CurrentSpeed = WalkSpeed
@abdou.the.heretic
@abdou.the.heretic 9 месяцев назад
​@@uliveulearnandregretthanks for the idea! Very well explained!
@jutraim2422
@jutraim2422 9 месяцев назад
add these to the beginning of the code: var IsSprinting: bool var IsCrouching: bool replace crouching and sprinting with: if Input.is_action_pressed("crouch"): IsCrouching = true current_speed = crouching_speed head.position.y = lerp(head.position.y,1.8 + crouching_depth,delta*lerp_speed) else: head.position.y = lerp(head.position.y,1.8,delta*lerp_speed) IsCrouching = false current_speed = walking_speed if Input.is_action_pressed("sprint") and !IsCrouching: IsSprinting = true current_speed = sprinting_speed elif IsCrouching: current_speed = crouching_speed else: IsSprinting = false current_speed = walking_speed I'm a beginner ^^ I managed to do it like this and it works for this project =) Please correct me if I did something redundant.
@joel2430
@joel2430 7 месяцев назад
Great tutorial! Very clean and easy to understand code. I would explain what is written in the Godot manual though: " CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a MeshInstance3D with a PrimitiveMesh. "
@margarita2077cyber
@margarita2077cyber 10 месяцев назад
Man, thank you. Really BIG thanks.
@lukky.
@lukky. 10 месяцев назад
You're welcome :)
@margarita2077cyber
@margarita2077cyber 10 месяцев назад
@@lukky. I've got a problem. Where can I contact you?
@devanmauch7843
@devanmauch7843 6 месяцев назад
I had an idea for future tutorials for newer users of godot to learn better, whenever you're doing something similar to what you previously did it might be beneficial to tell them to try it on their own so they can learn how their code works better. Like for instance when figuring out how to rotate the head horizontally it's a good opportunity to put your mind to work and remember it more concretely. in any case this tutorial was awesome and I hope to see more!
@asdfghjkl-jk6mu
@asdfghjkl-jk6mu 5 месяцев назад
Glad to see a fellow pallas cat enjoyer!
@Theinvalidmusic
@Theinvalidmusic 11 месяцев назад
Really great tutorial. Now to go and rip out my old extremely janky character controller and replace with this.
@tayorain6554
@tayorain6554 17 дней назад
i like your videos thanks man i have subscribed for more
@Pichotweb
@Pichotweb 13 дней назад
Thanks for your time and effort to teach us! one tip when renaming variables is the Ctrl + D that will select all similar ocurrecies, like in other editors like VS Code!
@ipherial2929
@ipherial2929 6 месяцев назад
One thing I have discovered for crouching that I use instead of using code to change the height is an animation player. It lets you adjust the height of anything on your player while also not cluttering your code as much since all you have to do is tell it to play one animation when crouch is pressed and another when it is released.
@darxkl05
@darxkl05 10 месяцев назад
Thank you so much, I've been struggling with the player for months now, specially the crouching. I'm using godot 3.5 and I only had to tweak a few things, but aside from that, thank you so fucking much
@EduArdo-jl3qj
@EduArdo-jl3qj 3 месяца назад
muito obrigado amigo, eu demorei a achar um tutorial simples e atual do godot ( thanks )
@mimadm4832
@mimadm4832 10 месяцев назад
Most based tutorial I have followed
@bonddang9550
@bonddang9550 11 месяцев назад
Awesome! Can you show us footstep on different material when you walk on it next? Thank you!
@lukky.
@lukky. 11 месяцев назад
I'll try and include it in part 3!
@coding_guy
@coding_guy 9 месяцев назад
this guy is cracked
@mamontain
@mamontain 7 месяцев назад
Big thanks, great tutorial.
@slippery_james6
@slippery_james6 4 месяца назад
so good
@Flamsleburger
@Flamsleburger 7 месяцев назад
This is the best tutorial I've come across, ever! One problem I had though is that my character would fall through the floor after un-crouching after I added the raycast. It might have something to do with my variables, but if you know how this issue could've happened it would help a ton! Edit: Nevermind I just accidentally deleted like 3 lines of code lol
@SiisKolkytEuroo
@SiisKolkytEuroo 9 месяцев назад
Nice video! The only detail I'm seeing that I would improve on, is that you're lerping the camera inside the physics_process function. You want to figure out a way to do it in process, so that the camera position updates on every frame (interpolates smoothly).
@MohMoh-td9um
@MohMoh-td9um 11 месяцев назад
bro you saved me
@pemba999
@pemba999 10 месяцев назад
great tutorial! can you do a short one for controller (mainly the looking around)
@fatmike5038
@fatmike5038 9 месяцев назад
great lesson, but I love the desktop the most. My spirit animal
@markmisin
@markmisin 8 месяцев назад
Thanks!
@lukky.
@lukky. 8 месяцев назад
You're welcome! Thank you for the donation :)
@markmisin
@markmisin 8 месяцев назад
@@lukky. My pleasure! I've become a lot smarter in 3D game development thanks to your tutorials.
@otrusuario
@otrusuario 4 месяца назад
I LOVE YOU
@user-ky6ug6eq4c
@user-ky6ug6eq4c 10 месяцев назад
very usefull
@slip_to_thesilent
@slip_to_thesilent 3 месяца назад
the cats gaze on desktop got me of guard
@iLoop-18
@iLoop-18 Месяц назад
من العالم العربي شكراً لك شرح ممتاز وبسيط
@midnightmuni
@midnightmuni 11 месяцев назад
Really helpful tutorial as always! Are there plans to cover ladder climbing or even ledge hanging in the future?
@lukky.
@lukky. 11 месяцев назад
Going on the list for part 3! No promises tho there are alot of Request and I wanna keep the videos focused
@Bluepikminproductions
@Bluepikminproductions Месяц назад
"chairicter body" -Lukky 2023 (did anybody else hear this?)
@KatouMiwa
@KatouMiwa Месяц назад
haha the folder beard on your deskCat hehe
@aqua3942
@aqua3942 9 месяцев назад
I ran into a small bug with the raycast i haven't seen other comments mention, so I thought I'd share my solution incase anyone else needs it. When I set my RayCast3D node to the bottom of my player, it would detect the StaticBody3D that I had set as the scene's floor, basically locking the player into the crouched position after the crouch input was pressed. All I did to fix it was raise the raycast node's Y position by 0.1, and then shorten the raycast node's target position by 0.1 on the Y axis. So now the node is now off the ground, and still reaching the top of the player. Great tutorial btw, really appreciate it!
@lenawillis2484
@lenawillis2484 2 месяца назад
Lifesaver, 6 months later. Thank you!!
Далее
Why Do Video Game Studios Avoid Blender?
6:49
Просмотров 339 тыс.
Me: Don't cross there's cars coming
00:16
Просмотров 2,2 млн
Planning out an entire Game!
8:13
Просмотров 21 тыс.
Optimizing my Game so it Runs on a Potato
19:02
Просмотров 456 тыс.
Immersive Sim in Godot 4: COGITO - Overview
8:22
Просмотров 33 тыс.
10+2 AWESOME ADDONS for GODOT 4
8:36
Просмотров 126 тыс.
3 Hours vs. 3 Years of Blender
17:44
Просмотров 4 млн
I'M MAKING A GAME!
8:20
Просмотров 94 тыс.
The Future of Game Development
8:58
Просмотров 1,1 млн
Godot 4.0 Third Person Controller Tutorial ( 2023 )
33:30
Unreal in 100 Seconds
2:52
Просмотров 850 тыс.
Me: Don't cross there's cars coming
00:16
Просмотров 2,2 млн