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!
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!
bro wtf💀
What do you mean?
What did you mean by this?
@@youforgotthelinkinthedescr6798 bto how he teaches geniunely made me excited
@@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
No hes hard@@IlluminatiJoeCrusade
a heckin love godot 4 fps tutorials
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
Were you able to add this?
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
Thank you. Keep up the good work! (Come on lads, let's support this brilliant guy)
🙏 will do, more stuff in the works as we speak !
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!
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!
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.
This, then it would rly be ultimate!
looking forward to the next videos!
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!!!
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.
omg u read my mind i was about comment those
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
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
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 🙌
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!
@@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 !
These were exactly the modifications I did too. It feels a lot better in my opinion too.
Thank you! this is an interesting approach
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)
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)
Best Godot tutorials!
Good timing ! Thanks for the part 3 :)
I've been waiting with baited breath for this! Thank you for the awesome tutorials, you are my favorite youtuber for Godot 4!!!!
You...are...amazing.
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.
You've helped us write a feature-packed and scalable fps controller. Incredibly high quality content, thank you so much!
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
I suggest make some tutorials about 2d Character fighting and programming, cutscene camera movement
These tutorials are great! Can't wait for the requested features. :)
This was an amazing introduction to godot! Thank you a lot
amazing tutorial series, thank you very much!
thanks a lot brother !!!
Thanks for this series, it is excellent!
Thanks for this series
Great series! Very clear explanations !
muchas gracias bro, llegarás muy lejos con ese conocimiento. me ayudó bastante a entender mucho más las herramientas y script de godot.✌⚡
Excellent work. Perfect video. 10/10.
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
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
"future tutorials"
can you make a wallrun / walljump tutorial just like karlson but in godot 4
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
Man, amazing videos! Thanks ü so much❤️
Very very good tutorial, keep it up
Perfection, Lukky.
thank you for the great tutorials you really helpem me out
great tutorial. could you please show us how to add sound
phenomenal tutorial,, if you don't want to your code to be completely unreadable afterwards 😅
still helps me with getting started though
Please add hands
Yes, Hand Look realistic
You add hands.
I already have a full tutorial on first person hands and animation right here ! ua-cam.com/video/a3GjUyBDwe4/v-deo.htmlsi=T4liOlSazoveDog7
Hey lukky can you make a vaulting/wall running tutorial I would really appreciate it.....
This is best movement tutorial
Instead of lerping current_speed everywhere, you can just lerp velocity.x and z. I have made an acecleration and deceleration variable.
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?
good stuff
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.
I'd love to see a full body first person controller tutorial.
Cool
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
Thanks you a lot !
Awesome series, can you add a FSM to the controller :D
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
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
Bro could you upload a fourth video where you put the code in a state machine
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.
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.
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.
For simple controls, a character and a camera are enough, but it’s impossible to create a free look without an additional child element
best tut
Can you add Wall Running, wall jumping, bhopping and grappling like Dani in Unity in a extra tutorial
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
If I want to further develop this I should probably make Player it's own scene?
Add press to V and we change to third person
how do you make the slide not stop if the player is moving downhill?
Will you be adding attacks (melee and projectiles)?
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
how to we add sounds ? in animation ?
how would i convert the code to a state machine?
please learn to do some things yourself. it'll make you a better programmer
Great tutorial! Thank you. Seems that would eventually get to an overflow state, no? Nothing to reset it or clamp it.
It would probably take decades of the game running nonstop though.
my slide keeps making me slide backwards do u know how to fix it
Anyone know how to fix being stuck in crouch when crouching when using Jolt physics?
After my roll goes forwards, it automatically resets me back to the default position tweening and it looks weird. How can I fix this?
When I slide my player keeps sliding and doesn't stop can someone help me with this?
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?
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
Any reason for not using a State machine ? StayAtHomeDev uses one but men, I'm lost in his tutorial
probably because that would make the tutorials too long. stayathomedev has horrible code anyway lol
can you please help me with slide cancelling with the crouch
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?
when I try to add the jump animations they end up really choppy for some reason. anyone know what I'm doing wrong here?
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
Can I use it in my game?😅
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?
can I get the project download
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)?
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.
How is this working with stairs?
How would I implement footstep sounds in to this?
¿Third person controller part 2?
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 ?
hey, how would you go about adding controller support to the movement code?
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
I can hit the sprint button mid air and it makes me move further in the air. Any easy way to disable this? thanks
I added "if is_on_floor():" above "if Input.is_action_pressed("sprint"):" and this resolved my issue if anyone else is curious.
a cod plz
Bhai code kaha hai
Bro please give us full code in middle the code is getting wrong please help me fast
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?