AMAZING TUTORIAL, LITERALLY EVERYTHING I EVER WANTED. If anyone else had issues with the spring arm, try orienting your player model mode 180 degrees, or rotating stuff around 180 degrees, I think I had mine set up backwards initially lol
Oh my... Thank you so much, I was searching for videos if anyone had done a more in depth tutorial where, idrk how to say it, the camera didn't like dictate the character movement... I've seen like 3 videos where they do same thing where the Camera just automatically moves the character, it's more useful if like I want to lock on an enemy But the camera being its own thing that influences movement input is so so much more comfortable to use especially coming from games like Dark Souls & Warframe 💖
This is amazing, loved your third person controller for godot 3!!! Right now i'm redoing my character meshes, rig and animations, my next step would be to try to migrate your controller but you came back with this gift. Thanks you a lot!!
Dude you are a lifesaver Im porting my game from unity to godot and was looking at 3rd person tutorials and they all sucked this one does it very similarly to how I had it set up in unity plus it clarified a bunch of systems to me so I could easily tweak it thank you!!!!!
@@JohnnyRouddro thanks for the tutorial it helped me to understand some systems and design principles. But, i have one question: in the editor and blendspace my stand/idle animations are playing as normal, but when i run the game these animations just playing the 1 keyframe of the animation. For example in the stand state my model is frosen on the 1 keyframe of the stand/idle animation. I`ve tried to set up these two animations as looping - it did not work. What should i do?
@@sergeyiu2301 Happy to help 🙏 I think your problem could be related to this: github.com/godotengine/godot/issues/74706 Let me know if you've found the solution there.
best godot tutorial for this hands down. u the best johnny and deserve recognition. but please, consider slowing down the pace of the tutorial. i found myself pausing every 2-4 seconds to understand and copy your methods. love!!
Great question! The input being handled or not is relevant when you have the same input for multiple nodes, say a pause menu uses left click as well as player's "shoot" function. In that case, you use unhandled input for the player so if the menu uses the input, the player doesn’t. More details about this topic in this comment of a reddit post: www.reddit.com/r/godot/s/gAkGpphasl
The camera collision does not work for me. So, I watched another video to fix it. The SpringArm3D needs to be inside the head of character and its coda to be aiming at the camera. Then, add the sphere shape like as this video, witch a small radius to able to it "pass" offside of the wall/floor.
Hey, nice Tutorial. Tho I have one thing to correct: When you added the collision Shape to the Spring Arm 3D and told us to change the Physics engine, I noticed that I myself don't have the same Issue as you did even tho I use the Default Physics Engine! → So I assume that it is either on your end or was fixed in the newer Version of Godot?
Thanks for the info! I used 4.2.1 which is currently the latest. So, it could be something else 🤔 I'm curious. But in any case, Jolt is recommended by Juan himself and it may become the next default engine. Check this post: www.reddit.com/r/godot/s/AAbYdGgRli
The camera script is a little confusing to me I want the free movement 3rd person camera, But I also don't want to just copy code when I don't know what I'm doing.
It's true that yaw/pitch creates confusion, I myself struggle to remember what yaw and pitch is. I just tell myself "yaw" is "no" (nod left right), and "pitch" is "yes" (nod up down). Having pitch node as a child of yaw node makes it easier to have a gimbal formation. Think of it like this, you're wearing a 1980's batman suit, and you can't turn your neck left/right. You can only turn your Body left/right, and your Head up/down, thus covering the whole 360 sphere. In this case your body is the yaw node (Left/Right), and your head is the pitch node (Up/Down). Now write the script to do exactly that for each node's local axis and you're good to go.
@@JohnnyRouddro thankyou for the reply! I did end up understand more after messing around with Godot myself. I was trying to make the character face the direction of the camera on my own, and found out how pitch and yaw worked. I couldn't figure out how to get the yaw. Rotation to the player since I separated them to two different scenes. So i went back to your video and I seen you helped out with that too so thanks a lot! The state machines really confuses me so I stopped watching. even though that's the only thing I really feel is holding me back from making any game. I want to make a state machine but they are always so confusing. I like the way you used resources though. So I might end up frankensteining that state machine with different one because that's a lot of code in one block.
The way you are figuring things out on your own is the best way to learn imo. You can make the entire control system without any state machine, just like I did in my third person series from 3 years ago. Try to make what you want with knowledge you already have. You WILL eventually hit many brick walls coz that's how game dev is. That is the perfect moment to learn new techniques, as you will see real life use cases.
TIP FOR ANYONE WITH CAMERA ISSUES: The CamRoot Yaw and Pitch Nodes should be where you want the camera to pivot, then put the Camera 3D as far as you want from the player centered to the back.
@@ahsanjahangir9540 The project has the glb file which you can import in blender. And actually I wont be able to teach you personally as I am already fully occupied with a full time job. Still, you can add me on discord my username is johnnyrouddro. I could help with your projects whenever possible.
For anyone who is mixing his tutorial with something you already have, the is_movement_ongoing() method is a boolean for absolute speed (true if is moving): func is_movement_ongoing() -> bool: return abs(movement_direction.x) > 0 or abs(movement_direction.z) > 0
also, thanks for the tutorial, i'm trying working out the jump animation with the controls itself, kinda hard to nail it, but even this helped alot (even though is not necessarily about jump)
@@JohnnyRouddro yeah, i was there, but then i choose to follow every step the way, because there is tons of concepts really new for me in this one, so i choose to follow your way to move the character to not have a massive debug process later, i'm having a little problem with the walk animation, associated with a little stutter (probably due to time of transition between animations) but really don't know yet how to fix it. Now is time for the jump video though, see you there! xD
I'm following the tutorial word for word and when I get to 8:00 when my character should be moving they aren't. I have no clue why it's not my code looks the exact same and I followed each step. It is recognizing the inputs, I put a print function under the 'if is_movement_ongoing():' code and when I hit all keys it's displaying the right information. Would appreciate some help.
did you connect the signals (7:18)? you can also check the functions who are "receiving" the signals by writing print inside those. You can also use breakpoints by clicking left in the editor. A red dot appears on the left. The game will pause if the red dotted line is run, you can see other information in the debugger while the game is paused on that line.
@@JohnnyRouddro Thanks for telling me about the break points that'll be useful for later. I did that and it seems that direction information isn't being sent from anywhere and I'm not sure why. I looked everything over and found out I had an extra s in a physics function. My guy is sliding around when I'm not pressing anything but that's probably something I fix by modifying the movement states right?
I’m having some issues following along. You go pretty fast and don’t really explain anything. I constantly have to go back and pause to see what exactly happened on screen, which isn’t easy because you often fly through everything. It’s cool that you can do this really fast and all but you’re making a tutorial, it should be easy to follow along and understand what’s happening. It would also be cool if instead of having the project files for just the finished project, if you gave the files for each leg of the series. If I want to make sure my code is what it’s supposed to be, I can’t look at the project files because you change and replace things along the way. So I end up having to find a spot in the video where I can see your code which isn’t ideal. Anyway, love the videos and thanks for making educational content.
Are you taking requests brother? Would like to place a request for root motion and ik blending for the tps controller (climbing, interacting etc.) But please, do whatever you want with it. I'm just happy to see you after so long 😢
Hey great tutorial, and not to be that person as I'm certain that we are all learning Godot (Which is why we are here) but can you possibly slow down on the next one? It just kinda goes hyper fast and I cannot keep up because it is like the steps fly by super fast. Like setting up the animation call states. :( But really appreciate and have saved and will re-watch and re-watch until I get it!
Thanks a lot for the feedback. I should have mentioned, this is NOT a beginner tutorial 😄 I intended to make these for more intermediate level devs. For a beginner, I would NOT recommend making advanced third person controllers right away. After you've made like 3 or 4 small practice projects (like flappy bird, pong), I would recommend more advanced stuff like this. At that point this speed may feel more comfortable, as you would know the basics already, and you would come here to get a peek at how I've solved these problems. After I'm done with my next series, I'm seriously considering making a beginner project series. I haven't made any of those yet because there are so many beginner tutorials already. But these days more and more devs are coming to Godot and I can't wait to be the introductory channel to Godot. Thanks again for the comment 🙏
PLEASE keep going, I have been looking for a tutorial that actually uses components so I can understand them better, I am debating using this action/attribute system addon that just uses tags to allow or disallow actions so you can even create something like a skill tree by just adding and removing tags from an object.
Oops! I forgot to say I was connecting the "set_movement_state" signal from the player script to the "_on_set_movement_state" function I just created. Thanks for pointing it out.
This couldn't have come out at a better time!! I just started making a third person shooter in Godot 4! Will you be making a shooter version with aiming like you did for Godot 3?
Aiming, Strafing maybe included in this series. I'll prioritize RPG mechanics after this, melee combat and all that. Then hopefully I'll do the shooter.
So how would you implement stepping over small objects/stairs? have multiple raycasts to "test" the height of an object and then alter the transform of the player? Sorry, if iths will be covered in future videos.
Why those simple animations look so good? May you release them please? Edit: I saw you put the source code directly, what are the chances to change the model of the player but keep the same animations in your opinion?
This is a great tutorial if you already know a fair bit about Godot, it is incredibly hard to follow and goes way to fast if you're just learning Godot.
Hey there. The animation controller receives a movement state, and passes the animation id to the animation tree. Then the animation tree sets the value of the blend space to that id.
@@JohnnyRouddro Thanks for you instant response. Although i figured it out. by slowing down your video :D. Thanks again. keep doing good work. May god bless you.
I'd say there is only the "roll" action missing, which I left for my other tutorials to cover. As it's more relevant to a combat system. Other than that, this one's a pretty big upgrade from the 3.2 version. There's a stance system which the previous one didn't have. The player can have many stances like stand, stealth, crouch or prone. And the movement states - idle, walk, run, sprint combined with these stances creates a lot of opportunities for a character control system which the previous one didn't have.
I've never tested the performance, but I'm pretty sure it's not very significant. Nodes are needed when you need a reference to something in the scene tree.
first of all, thanks for the tutorial, helped alot now my question: i tried to edit the camera to be an over-shoulder-cam but it keeps clipping into the wall, how could i achieve such a look?
@@JohnnyRouddro Managed to resolve it. My bad. :) Another question though. If i wanted to tweak the animation speed of the run/sprint animation, how would i go about that?
Hello. Very useful video. But is it possible to do this in C#? I'm having big problems with signals in C# using your logic. Are there any plans to make a similar video for C#?
Hey there! Tbh I haven't yet tried C# in Godot but I can see the increasing demand. I'll add it to my to-do list, but it could have some delay as I need to cover other hot topics first. Thanks for bringing it up 🙏
Thank you very much! Will wait. It seems that I have almost transferred your project to C#, but there is one problem that I cannot solve for a long time. I'm new to programming, so some things are still difficult for me.
Thanks for the tutorial! I have this issue where when the player is running and I change the direction by moving the camera, the player slows down. It will slow down, then ramp back up to running speed. Or in some cases, it slows and stops moving until I press a WASD key again. On the other hand, when I change direction using WASD and don't move the camera, the player maintains the same speed while changing direction. This is the behavior I'm trying to achieve when using camera to change direction as well. Anyone encounter this?
at this point, may i ask you if im allowed to use the code you provided (only the code, not the assets) as a starting template for a small project of mine. its well defined and doesnt need any refactoring. liked and subscribed :)
It's completely free for any use. Project link: johnnyrouddro.itch.io/godot-4-third-person-controller You can also follow me on itch to see bugfixes and updates on the project.
I've made little changes in the project (features/bugfixes/reorganizing etc.) after the videos were completed. These videos are for reference purpose. In early version the character had a different rig and it was bigger. In new version I've scaled it up in Godot.
Probably the animation is not looping. You can have "-loop" as a suffix of the animation names so Godot automatically makes them looped when importing.
hey for whatever reason my guy only walks when the camera is moving i think its because my mouse movement counts as movement at the if event.is_action("movement"):? idk i am very bad at coding thats why i dont like using tutorials lol ok i fixed it, it was a weird bug? i set if is movement ongoing to if not movement is ongoing
Hey! I have a quick question. Do you suggest doing the animations in Godot or Blender? I made a simple animation in Godot, and it works, but I see most people doing the animations inside Blender.
For 3d character skeleton animation, blender all the way. Godot is not designed for skeleton animations. Blender on the other hand, has all the necessary tools for animation.
@@JohnnyRouddro ohh alright, yeah, I made the hand animation but it was simple, so I'm guessing simple animations can be done on Godot, while "advanced" animations are done in Blender.
I recommend that you do everything through Blender. In Godot there are problems that if you want to reimport the model, the animations you made in the engine are lost.
Thank you soo much for the tutorial!! I have a slight issue though, why is my pitch is not moving ? i have debugged the pitch values by printing it out whenever i move my mouse up n down. The pitch surely is increasing in values, but its not physically moving in godot when running it. any idea on how to fix it?
Thank you for the video. I'm having trouble with getting this to work at all though. The input is all messed up. How does the input possibly work when sprint, run, walk, etc aren't in the input map? I keep getting errors looking for those as inputs and the character will not move. Also, I'm getting a signal error as well, which I think is the issue, but I just cannot figure it out. Do you have any idea what I may have done wrong?
WHEN THE WORLD NEEDED HIM THE MOST HE CAME BACK
Hell yeah! I've been using your godot 3 third person controller as a reference a lot, awesome to see you upgrading it to 4!
Just got into Godot and I'm following the your 3.5 third person controller. Good to see an updated one. Looking forward to the series
You're back man! So glad to see a new updated series from you! :)
He has returned! Good to see you back on the Godot scene bro. Excellent tutorial as always
Damn, he's back!
FR this year gonna be lit.
Amazing work! Keep going please🤗
whoa, your comeback wasnt in my 2024 bingo card honestly
AMAZING TUTORIAL, LITERALLY EVERYTHING I EVER WANTED.
If anyone else had issues with the spring arm, try orienting your player model mode 180 degrees, or rotating stuff around 180 degrees, I think I had mine set up backwards initially lol
Great!
Ive been wanting you to do this one!
Oh my... Thank you so much, I was searching for videos if anyone had done a more in depth tutorial where, idrk how to say it, the camera didn't like dictate the character movement...
I've seen like 3 videos where they do same thing where the Camera just automatically moves the character, it's more useful if like I want to lock on an enemy
But the camera being its own thing that influences movement input is so so much more comfortable to use especially coming from games like Dark Souls & Warframe 💖
Finally! Been waiting for Godot 4 after using the Godot 3 videos! Keep up the great work!
This is amazing, loved your third person controller for godot 3!!! Right now i'm redoing my character meshes, rig and animations, my next step would be to try to migrate your controller but you came back with this gift. Thanks you a lot!!
Dude you are a lifesaver Im porting my game from unity to godot and was looking at 3rd person tutorials and they all sucked
this one does it very similarly to how I had it set up in unity plus it clarified a bunch of systems to me so I could easily tweak it thank you!!!!!
Thanks! Glad to hear that I could be of some help.
@@JohnnyRouddro thanks for the tutorial it helped me to understand some systems and design principles. But, i have one question: in the editor and blendspace my stand/idle animations are playing as normal, but when i run the game these animations just playing the 1 keyframe of the animation. For example in the stand state my model is frosen on the 1 keyframe of the stand/idle animation. I`ve tried to set up these two animations as looping - it did not work. What should i do?
@@sergeyiu2301 Happy to help 🙏 I think your problem could be related to this: github.com/godotengine/godot/issues/74706 Let me know if you've found the solution there.
He came back when we needed him the most
Stellar tutorial and editing, thank you for this
best godot tutorial for this hands down. u the best johnny and deserve recognition. but please, consider slowing down the pace of the tutorial. i found myself pausing every 2-4 seconds to understand and copy your methods. love!!
such great tutorial, thank you!
thank you, very nice to have you back
Welcome back, i liked your math explanation
5:52 Just wondering, isn't _unhandled_input() better to use for game play input? (awesome video btw)
Great question! The input being handled or not is relevant when you have the same input for multiple nodes, say a pause menu uses left click as well as player's "shoot" function. In that case, you use unhandled input for the player so if the menu uses the input, the player doesn’t. More details about this topic in this comment of a reddit post: www.reddit.com/r/godot/s/gAkGpphasl
@@JohnnyRouddro thank you for the explanation!
8:15 if you receive an error at line 30 is that because he sneak another variable called cam_rotation at line 10.
So Cool, I see that you have done a big redesign for how you script the Third Person Controller.
Now it is way betteeeer!
THE BEST LESSON IN THIS YEAR THANKS
you're back ! love it
Hey, it may just be me, but my character just stands in air, doesn't fall, doesn't move, nothing. Help?
did you manage to figure it out? I have the same problem
@@MinimumBulb might have missed adding "move_and_slide()" in your code
Também sigo com esse problema
@@_r_u_n_Can you tell me what code? And if it is necessary to connect it to any node?
welcome back king
You sir are a gentlemen and a scholar! thank you for doing this. It helped simplify our movement code so much!
Great to hear that! 😊
Yes his back
The camera collision does not work for me. So, I watched another video to fix it. The SpringArm3D needs to be inside the head of character and its coda to be aiming at the camera. Then, add the sphere shape like as this video, witch a small radius to able to it "pass" offside of the wall/floor.
Thank you very muchhh Johny
You're welcome 🙏
For some reason the player always faces the camera. I cant seem to figure out why. Otherwise really good tutorial
Man I was struggling with my players rotation for Soooo long until I randomly started watching this and it had exactly what I was looking for😂
Hey, nice Tutorial. Tho I have one thing to correct: When you added the collision Shape to the Spring Arm 3D and told us to change the Physics engine, I noticed that I myself don't have the same Issue as you did even tho I use the Default Physics Engine! → So I assume that it is either on your end or was fixed in the newer Version of Godot?
Thanks for the info! I used 4.2.1 which is currently the latest. So, it could be something else 🤔 I'm curious. But in any case, Jolt is recommended by Juan himself and it may become the next default engine. Check this post: www.reddit.com/r/godot/s/AAbYdGgRli
The camera script is a little confusing to me I want the free movement 3rd person camera, But I also don't want to just copy code when I don't know what I'm doing.
It's true that yaw/pitch creates confusion, I myself struggle to remember what yaw and pitch is. I just tell myself "yaw" is "no" (nod left right), and "pitch" is "yes" (nod up down). Having pitch node as a child of yaw node makes it easier to have a gimbal formation. Think of it like this, you're wearing a 1980's batman suit, and you can't turn your neck left/right. You can only turn your Body left/right, and your Head up/down, thus covering the whole 360 sphere. In this case your body is the yaw node (Left/Right), and your head is the pitch node (Up/Down). Now write the script to do exactly that for each node's local axis and you're good to go.
@@JohnnyRouddro thankyou for the reply! I did end up understand more after messing around with Godot myself.
I was trying to make the character face the direction of the camera on my own, and found out how pitch and yaw worked. I couldn't figure out how to get the yaw. Rotation to the player since I separated them to two different scenes. So i went back to your video and I seen you helped out with that too so thanks a lot!
The state machines really confuses me so I stopped watching. even though that's the only thing I really feel is holding me back from making any game. I want to make a state machine but they are always so confusing.
I like the way you used resources though. So I might end up frankensteining that state machine with different one because that's a lot of code in one block.
The way you are figuring things out on your own is the best way to learn imo. You can make the entire control system without any state machine, just like I did in my third person series from 3 years ago. Try to make what you want with knowledge you already have. You WILL eventually hit many brick walls coz that's how game dev is. That is the perfect moment to learn new techniques, as you will see real life use cases.
Awesome tutorial!
yes fr
Finally, Third Person Controller for Godot 4 Tutorial is here. Keep it up!
TIP FOR ANYONE WITH CAMERA ISSUES: The CamRoot Yaw and Pitch Nodes should be where you want the camera to pivot, then put the Camera 3D as far as you want from the player centered to the back.
Guys my camera is rotating when i move it, is there any way to fix it?
Bro where you find the animations are they default in GD??
I made them myself. You can download the project and use the model for learning.
@JohnnyRouddro In Blender??
And one more thing. Can you teach me about godot like online class??
@@ahsanjahangir9540 The project has the glb file which you can import in blender. And actually I wont be able to teach you personally as I am already fully occupied with a full time job. Still, you can add me on discord my username is johnnyrouddro. I could help with your projects whenever possible.
THE BOYS ARE BACK IN TOWN
okay yep this is the one right here
Your Godot tutorial is great, but you skipped some important details in the camera part. I can't figure out how you got the spring arm to work.
It's pretty straightforward actually, I've explained it briefly at 3:30.
LEGEEEEEEEEEEEEEEEEEEENDDDDD IS BACKKK, DAEMMMMMMMM
but this one is hella lot complicated that normal ones !
for some reason my character doesn't move or fall, only rotates in place. does anyone know how to fix this?
same issue and i dont knwo hwo to fix it.
yeah i never figured it out
For anyone who is mixing his tutorial with something you already have, the is_movement_ongoing() method is a boolean for absolute speed (true if is moving):
func is_movement_ongoing() -> bool:
return abs(movement_direction.x) > 0 or abs(movement_direction.z) > 0
also, thanks for the tutorial, i'm trying working out the jump animation with the controls itself, kinda hard to nail it, but even this helped alot (even though is not necessarily about jump)
also, noticing now that he actualy point it out in the video, i must been distracted.
Well this was a rollercoaster ride XD Anyway, you can check other videos of this series. There's one with a jump system, you might find what you need.
@@JohnnyRouddro yeah, i was there, but then i choose to follow every step the way, because there is tons of concepts really new for me in this one, so i choose to follow your way to move the character to not have a massive debug process later, i'm having a little problem with the walk animation, associated with a little stutter (probably due to time of transition between animations) but really don't know yet how to fix it. Now is time for the jump video though, see you there! xD
Woah, actually good!
the quality of production and teaching is insane, and it's all for free. thank you sm for all the time you took to put these out! cheers
I'm following the tutorial word for word and when I get to 8:00 when my character should be moving they aren't. I have no clue why it's not my code looks the exact same and I followed each step.
It is recognizing the inputs, I put a print function under the 'if is_movement_ongoing():' code and when I hit all keys it's displaying the right information.
Would appreciate some help.
did you connect the signals (7:18)? you can also check the functions who are "receiving" the signals by writing print inside those. You can also use breakpoints by clicking left in the editor. A red dot appears on the left. The game will pause if the red dotted line is run, you can see other information in the debugger while the game is paused on that line.
@@JohnnyRouddro Thanks for telling me about the break points that'll be useful for later. I did that and it seems that direction information isn't being sent from anywhere and I'm not sure why.
I looked everything over and found out I had an extra s in a physics function. My guy is sliding around when I'm not pressing anything but that's probably something I fix by modifying the movement states right?
I’m having some issues following along. You go pretty fast and don’t really explain anything. I constantly have to go back and pause to see what exactly happened on screen, which isn’t easy because you often fly through everything. It’s cool that you can do this really fast and all but you’re making a tutorial, it should be easy to follow along and understand what’s happening. It would also be cool if instead of having the project files for just the finished project, if you gave the files for each leg of the series. If I want to make sure my code is what it’s supposed to be, I can’t look at the project files because you change and replace things along the way. So I end up having to find a spot in the video where I can see your code which isn’t ideal. Anyway, love the videos and thanks for making educational content.
Thanks for giving such detailed feedback. I myself have a lot to learn in the tutorial making area.
great work
i followed everything and for some reason the camera doesnt move up or down but rotates in a cirlce around when i move the mouse in those directions
Are you taking requests brother? Would like to place a request for root motion and ik blending for the tps controller (climbing, interacting etc.) But please, do whatever you want with it. I'm just happy to see you after so long 😢
Thanks 🙏 I'll keep it on my list.
I don't know why but my springarm is broken it automatically go on the sky without any collision
Thank you for the tutorial! How could we change the code so that the camera movement isn't inverted?
add a negative "-" sign to the line where the rotation gets assigned. yaw for horizontal, pitch for vertical.
Hey great tutorial, and not to be that person as I'm certain that we are all learning Godot (Which is why we are here) but can you possibly slow down on the next one? It just kinda goes hyper fast and I cannot keep up because it is like the steps fly by super fast. Like setting up the animation call states. :(
But really appreciate and have saved and will re-watch and re-watch until I get it!
Thanks a lot for the feedback. I should have mentioned, this is NOT a beginner tutorial 😄 I intended to make these for more intermediate level devs. For a beginner, I would NOT recommend making advanced third person controllers right away. After you've made like 3 or 4 small practice projects (like flappy bird, pong), I would recommend more advanced stuff like this. At that point this speed may feel more comfortable, as you would know the basics already, and you would come here to get a peek at how I've solved these problems.
After I'm done with my next series, I'm seriously considering making a beginner project series. I haven't made any of those yet because there are so many beginner tutorials already. But these days more and more devs are coming to Godot and I can't wait to be the introductory channel to Godot. Thanks again for the comment 🙏
@9:51 For some reason it won't let me drag my char/player to the Anim Player slot, only my AnimationPlayer. Any idea why?
Hello you probably won't see this but for some reason the fov change is straight up just not working for me and it crashes when I try to sprint
return of the king
PLEASE keep going, I have been looking for a tutorial that actually uses components so I can understand them better, I am debating using this action/attribute system addon that just uses tags to allow or disallow actions so you can even create something like a skill tree by just adding and removing tags from an object.
Bro that camera feels sooo good, I learned a lot. Tksm
8:56 What's going on here? Why so fast?
Oops! I forgot to say I was connecting the "set_movement_state" signal from the player script to the "_on_set_movement_state" function I just created. Thanks for pointing it out.
ohhh!! look who it is!!
This couldn't have come out at a better time!! I just started making a third person shooter in Godot 4! Will you be making a shooter version with aiming like you did for Godot 3?
Aiming, Strafing maybe included in this series. I'll prioritize RPG mechanics after this, melee combat and all that. Then hopefully I'll do the shooter.
So how would you implement stepping over small objects/stairs? have multiple raycasts to "test" the height of an object and then alter the transform of the player?
Sorry, if iths will be covered in future videos.
I haven't given it much thought. Added to my list. I'll work on this after I'm done with other videos. Thanks for the comment 🙏
Why don't you use the Margin propiety of the SpringArm3D?
I've tried increasing the margin, didn't make any difference. The camera still went inside colliders.
Why those simple animations look so good? May you release them please?
Edit: I saw you put the source code directly, what are the chances to change the model of the player but keep the same animations in your opinion?
I used blender's meta rig so bone naming would match if you used another meta rig model. but I'm not sure if the animations would transfer well.
This is a great tutorial if you already know a fair bit about Godot, it is incredibly hard to follow and goes way to fast if you're just learning Godot.
Do you have any videos on implementing multiplayer with this controller?
I cannot work out how to synchronise the animations between clients 🤔
I've never even tried multiplayer 😅 Maybe one day.
how can i replace the models from the project in that link?
what is the reason for using csbbox 3d instead of static body for the enviroment?
I used it to make a flexible environment for quick prototyping.
@JohnnyRouddro thank you for the quick reply
Hi johnny hope you doing well, Can you elaborate the animation controller with key switch like idle, run and etc.
Hey there. The animation controller receives a movement state, and passes the animation id to the animation tree. Then the animation tree sets the value of the blend space to that id.
@@JohnnyRouddro Thanks for you instant response. Although i figured it out. by slowing down your video :D. Thanks again. keep doing good work. May god bless you.
For me, the last function does not work. The char does not stop while he moves himself. So, the "fov function kill" does not work.
I would suggest downloading the project and opening it with Godot's 4.2.x version. I hope it helps.
Is this an updated version of your 3.2 tutorial? Are there any parts in the 3.2 tutorial that you don't cover in this one?
I'd say there is only the "roll" action missing, which I left for my other tutorials to cover. As it's more relevant to a combat system. Other than that, this one's a pretty big upgrade from the 3.2 version. There's a stance system which the previous one didn't have. The player can have many stances like stand, stealth, crouch or prone. And the movement states - idle, walk, run, sprint combined with these stances creates a lot of opportunities for a character control system which the previous one didn't have.
@JohnnyRouddro ok thank you, this is exactly what I've been looking for
I would love to see this code in C#.
I’m a it late but this is very interesting. Is using a resource based state machine faster than a node based state machine?
I've never tested the performance, but I'm pretty sure it's not very significant. Nodes are needed when you need a reference to something in the scene tree.
Nice video my man, congrats. Just one question, how have you modified the terrain this way? Best Regards
Thanks 🙏 I explained it briefly at 1:12
Is there a way to add a sprint function without resources?
you can follow what I did in Godot 3 version: ua-cam.com/video/5adTaWiCWvM/v-deo.html
first of all, thanks for the tutorial, helped alot
now my question: i tried to edit the camera to be an over-shoulder-cam but it keeps clipping into the wall, how could i achieve such a look?
if you set the margin higher the camera will stop further back from the wall, should keep it from clipping into the wall better
Very good tutorial. Is there any way to adjust movement deceleration after releasing movement keys? Feels a bit slidey for what I'm working on.
You can increase the acceleration of the idle state. As releasing movement keys makes the player switch to idle state.
Hey! I followed everything but the animations arent playing when my character moves?
Does the armature need a rootbone for this method to work?
No root bone needed. Did you check if you connected all the signals?
@@JohnnyRouddro Managed to resolve it. My bad. :) Another question though. If i wanted to tweak the animation speed of the run/sprint animation, how would i go about that?
Hello. Very useful video. But is it possible to do this in C#? I'm having big problems with signals in C# using your logic. Are there any plans to make a similar video for C#?
Hey there! Tbh I haven't yet tried C# in Godot but I can see the increasing demand. I'll add it to my to-do list, but it could have some delay as I need to cover other hot topics first. Thanks for bringing it up 🙏
Thank you very much! Will wait. It seems that I have almost transferred your project to C#, but there is one problem that I cannot solve for a long time. I'm new to programming, so some things are still difficult for me.
@@JohnnyRouddro Today I managed to transfer your project to C#! I can send it if you are interested.
@@DarkDaimos I would like to get this file too please :D
Thanks for the tutorial!
I have this issue where when the player is running and I change the direction by moving the camera, the player slows down. It will slow down, then ramp back up to running speed. Or in some cases, it slows and stops moving until I press a WASD key again.
On the other hand, when I change direction using WASD and don't move the camera, the player maintains the same speed while changing direction. This is the behavior I'm trying to achieve when using camera to change direction as well.
Anyone encounter this?
what program are you using during the project overview? thanks
I'm using drawio 👉 www.drawio.com/
Im new to godot, how do you get ths csg box to have grid squares on it?
I created a square texture with border strokes, and made it repeating. I explained it briefly at around 1:04
@JohnnyRouddro yeah I figured it out later, great tutorial though!
at this point, may i ask you if im allowed to use the code you provided (only the code, not the assets) as a starting template for a small project of mine. its well defined and doesnt need any refactoring.
liked and subscribed :)
It's completely free for any use. Project link: johnnyrouddro.itch.io/godot-4-third-person-controller You can also follow me on itch to see bugfixes and updates on the project.
@@JohnnyRouddro yeah thank you very much, stuff like this really boost beginners in their making. thanks again!
@@timoschmitt8317 It's my pleasure 😊 I myself am learning and growing with these videos.
How is your camroot not showing too high when run scene? mine shows much higher than my head even the camroot is in the head.
I've made little changes in the project (features/bugfixes/reorganizing etc.) after the videos were completed. These videos are for reference purpose. In early version the character had a different rig and it was bigger. In new version I've scaled it up in Godot.
@@JohnnyRouddro oh alright. do you still use clippedcamera or changed to camera3D?
@@Ehren1337 I use SpringArm3D, explained in 3:30
Will you ever implement root motion in your tutorials?
Well I do have a big list now, and root motion's right at the middle 😄 Gonna cover the popular topics first.
@@JohnnyRouddro appreciate it 😄
i have a problem, when i walk,run or sprint the animation play for 1 second then it freeze the animation but i can move
Probably the animation is not looping. You can have "-loop" as a suffix of the animation names so Godot automatically makes them looped when importing.
@@JohnnyRouddro Yeah, it's works on me!
Thanks a lot man!!!
You just have to reimport the model by replacing it and that's it.
Movement states doesn't show up under the research tab when I search, not sure if anyone knows why. >> (appreciate it)
Save the script changes.
Then try searching. It had worked for me that way.
@@mark-moon3822 thank you!
YEAH BROTHER!
In the project overview, which software do you used?
drawio. It's super cool and FOSS.
bro make a video about mobile control or touch control
where video???
I can't use joystick camera move when i use joystick and joystick is a godot addon from asset library
hey for whatever reason my guy only walks when the camera is moving i think its because my mouse movement counts as movement at the if event.is_action("movement"):? idk i am very bad at coding thats why i dont like using tutorials lol
ok i fixed it, it was a weird bug? i set if is movement ongoing to if not movement is ongoing
Glad you could figure it out. 👌
Hey! I have a quick question.
Do you suggest doing the animations in Godot or Blender? I made a simple animation in Godot, and it works, but I see most people doing the animations inside Blender.
For 3d character skeleton animation, blender all the way. Godot is not designed for skeleton animations. Blender on the other hand, has all the necessary tools for animation.
@@JohnnyRouddro ohh alright, yeah, I made the hand animation but it was simple, so I'm guessing simple animations can be done on Godot, while "advanced" animations are done in Blender.
I recommend that you do everything through Blender. In Godot there are problems that if you want to reimport the model, the animations you made in the engine are lost.
@@mark-moon3822 ohh, gotcha, thanks!
большое спасибо!
Thank you soo much for the tutorial!! I have a slight issue though, why is my pitch is not moving ? i have debugged the pitch values by printing it out whenever i move my mouse up n down. The pitch surely is increasing in values, but its not physically moving in godot when running it. any idea on how to fix it?
Thank you for the video. I'm having trouble with getting this to work at all though. The input is all messed up. How does the input possibly work when sprint, run, walk, etc aren't in the input map? I keep getting errors looking for those as inputs and the character will not move. Also, I'm getting a signal error as well, which I think is the issue, but I just cannot figure it out. Do you have any idea what I may have done wrong?
Are you using Godot 4.2.1?