Make your first 3D Platformer in Godot 4: Setup, Movement, and Camera Controls
🔗 Code link: gist.github.com/bramreth/d963...
📰 Check out my Godot 4 course sale here! itch.io/s/99395/how-to-make-a...
✨ Socials ✨
🐦 Twitter: / bramreth
💬 Discord: / discord
🥰 Patreon: / bramwell
🎮Games: bramwell.itch.io/
Chapters:
00:00 Introduction and setup
01:24 Creating a 3D scene
03:24 Creating simple shapes
08:52 Graphical Settings
11:20 Supplemental Material
12:16 Creating The Player Character
15:10 Writing a movement script
22:55 Adding input events
25:17 Listening to four input events
27:38 Camera Controls
31:55 Listening to mouse inputs
33:56 Storing mouse motion
38:04 Using the twist_input
40:38 Using the pitch pivot
43:22 Creating node variables
44:55 Handling degrees and radians
45:45 Moving and the camera
47:40 Wrapup
#Godot4 #GodotEngine #Gamedev
Пікірлер: 503
It's rare to find a tutorial that really understands just how new its audience members can be. This was really well done, thank you!
@itsToMix
7 ай бұрын
Agreed!
@Gravy_Guzzler
7 ай бұрын
agreed
@cucubob9535
4 ай бұрын
yeah he explains every bit of code and guides us so well so we dont get lost. Wonderful tutorial
As a unity refugee this is very useful
@UnknownUser049
8 ай бұрын
As a Godot beginner i approve of this comment
@MrSirFluffy
8 ай бұрын
Lol same, just jumped on to Godot.
@neils-new-life
8 ай бұрын
Same
@KostasNostos
8 ай бұрын
Same case here
@moonblasterbow732
8 ай бұрын
me also...
Someone may have already mentioned this, but Godot 4.1.2 changed Input.set_mouse_mode(Input.MOUSE_MODE_"whatever") to Input.mouse_mode = Input.MOUSE_MODE_"whatever"
@tobiaspeelen4395
3 ай бұрын
for me the old way still works
In 4.2+ "Lock rotation" is under "Deactivation" in RigidBody inspector.
@Lambchop2559
Ай бұрын
You're doing the lords work
Man you're the only person I could find who showed how to make a floor mesh without going through 40+ minutes of video first. Thanks so much.
I just want to say, my brain likes the pacing of your tutorial. And you have a dope voice for it. Props to you for making this.
@TheWorldofMO
8 ай бұрын
bro, just unity was an great engine ._.
@Assortment54321
8 ай бұрын
@@TheWorldofMO :(
@Jiydiyon
7 ай бұрын
I tried learning Unity, then all of the stuff that happened happened, so like I guess Godot was the best choice as I had some level of experience with it on my old computer, but I don't remember a lot so....@@TheWorldofMO
Awesome Introductory guide, helped me start porting a project from Unity over to Godot after the ongoing debacle with that and this really helped me get a hand on the programming workflow for Godot. For other people who just went through this walkthrough you can make diagonal movements more consistent by normalizing the input Vector by adding '.normalized()' to the end of it, this makes your diagonal movements the same speed as your horizontal movements prevent diagonal running by faster. Thanks Bramwell for doing god's work.
@rocketadriftcartoons5617
7 ай бұрын
Thanks this tip was really useful.
I found this to have a great pace and level of detail for me. Your editing and commentry are also excellent. Thank you.
Really good job Bramwell. Only issues I have are: If you're using a character mesh that isn't a capsule etc, then you will be able to see that the character does not rotate toward the camera direction as the tutorial stands. Abstracting the raw numbers to a variable is good code practice, creating a move_speed variable for instance. Adding a springarm as a parent of the camera (but still a child of the pivots in this case) is also good practice, as it shouldn't allow (or at least make it less likely) that the camera will clip through objects in the game world. The input direction should be normalized to avoid being able to travel faster than intended in diagonal directions, otherwise the inputs are added together. As a rigidbody is being used, the actual movements should be handled in _physics_process
@000-chatGPT
2 ай бұрын
how do you make the player rotate with the camera?
@scorpi0uk
2 ай бұрын
@@000-chatGPT basically by rotating just the mesh and not trying to rotate the whole player, I played with it for a long time but rotating the mesh towards movement direction is the only way I can find right now, I'm actually working on my 3d platformer project now so I'll copy and paste some code in a sec
@scorpi0uk
2 ай бұрын
@@000-chatGPT input_direction = Input.get_vector("left", "right", "forward", "backward") if input_direction != Vector2.ZERO: # Calculate movment direction movement_direction = yaw_pivot.transform.basis * Vector3(input_direction.x, 0, input_direction.y).normalized() # Rotate mesh toward movement direction gobot_mesh.rotation.y = lerp_angle(gobot_mesh.rotation.y, atan2(movement_direction.x, movement_direction.z), delta * rotation_speed) # Move towards input direction velocity.x = movement_direction.x * move_speed * delta velocity.z = movement_direction.z * move_speed * delta else: # Slide towards previous input if there is no input. velocity.x = move_toward(velocity.x, 0, move_speed) velocity.z = move_toward(velocity.z, 0, move_speed) move_and_slide()
@000-chatGPT
2 ай бұрын
@@scorpi0uk thank you so much i’ll try it now
As a complete noob I have to say this is the best tutorial I have bern through! Please, please do more!
Thanks for the great tutorial. I've been doing something similar recenly, so here are some notes: 14:35 Why not use the "capsule" shape directly? It should be more performant in theory. 14:50 I've had an issue (climbing slopes) with this one and opted to instead lock all 3 angular axis, maybe it will help someone. 17:05 Isn't it better to just call them "built-in functions"? In terms of "virtuality", you can override the user-defined ones as well. 19:50 It is potentially bad to apply physics-related interventions from the "_process" callback. You could switch some internal state from "_process" and then apply force in "_physics_process". Or just set the "constant_force" from "_process", so that the physics thread can apply it when it pleases.
@infinity281
8 ай бұрын
thanku :D for the slopes issue!!!
@RaKanMusik
6 ай бұрын
callbacks
Dude this is a really well-made tutorial! You explain everything so well and it doesn't feel too fast or too slow.
So... we're all here after the BS pulled by Unity the other day huh 😂
@dynstinn
8 ай бұрын
Yep, that explains it
@thatcardiologist3874
8 ай бұрын
Everyone is saying Godot is easier to learn than unity, but it seems a lot more complex to me.. I was just beginning to learn unity and decided to try Godot out as well. Am I the only one who prefers Unity over Godot?
@dynstinn
8 ай бұрын
@@thatcardiologist3874 me too, but Unity is not a viable option for most people now
@Stop_803
5 ай бұрын
@@thatcardiologist3874there is a difference Godot already has a scripted written. And unity you need to add the #C script your self so it really is which one you know how to use
@frag0ment
5 ай бұрын
@@thatcardiologist3874no... I prefer unity because its easy but i quitted unity because latest news
Came here after the Unity install-fee debacle. This is an excellent introduction to Godot for someone coming from Unity. Thanks a lot :)
@newsciencestuff5540
8 ай бұрын
i love seeing greed get punished, delicious tears of the people who pushed this idea. was it the board or ceo idk, but whoever it was must be shitting their pants now lol
@sourlesscream1272
8 ай бұрын
same, you trying out different alternatives other than godot too?
@Learnerofthings
8 ай бұрын
I am loving it so far. Unity is toast.
@frankeeeej
8 ай бұрын
@@sourlesscream1272 I've dabbled with Unreal over the weekend as well. Right now I feel: - Unreal is a superpowerfull piece of software, but has 'it's way of doing things' (I have an existing charactermodel and animationrig, and haven't been able to get it to work as of yet) It also has a whopping 36 gig install size, and my pc doens't run it super smoothly.. - Godot is super lightweight, but with a lot less functionality. (for 3D games at least) With this streamlining comes more of a 'you figure out your own way of doing things' kinda approach, which I appreciate. With help of this wonderful video I could make a simple 3D platformer with an animated character in a couple of hours :) Also my pc runs Godot a lot better than Unreal. It's also open source and a non-profit organisation, which in todays technofeudalistic economy gives them 100 bonuspoints in my book :) So yeah, I'm currently leaning towards Godot. How have you been getting a long?
@thatcardiologist3874
8 ай бұрын
Everyone is saying Godot is easier to learn than unity, but it seems a lot more complex to me.. I was just beginning to learn unity and decided to try Godot out as well. Am I the only one who prefers Unity over Godot?
No disrespect to other helpful creators out there but I've been following loads of godot beginner tutorials, and this guy here is the best by far. He knows how to teach. He's probably a professional teacher.
Just started the video and already I have to say I'm liking your style of explaining things in a concise, yet detailed manner. Seems to be very thorough while being easy to follow for a beginner.👍
At 45:30, instead of using deg_to_rad(), you can actually reference the degrees directly: "pitch_pivot.rotation_degrees.x". So you don't need to convert the clamped values to radians.
@lemmings1892
4 ай бұрын
For me, it locks the pitch of the camera
@rumble1925
4 ай бұрын
@@lemmings1892 Here's the code I have: camera_mount.rotation_degrees.x = clamp( camera_mount.rotation_degrees.x, -45, 45) But take it with a grain of salt, I'm just a newb. It works for me and I did make some changes from the tutorial, I wanted more of a shooter-esque control scheme.
Hey man, thanks for this amazing tutorial. I've been an 3D Animator my whole career but for my free time I finally want to get into creating a few of my own games, of course a bit smaller in scale. It was really easy to follow along and you always came back and explained the code we were writing which is super important for me. (I followed other tutorials before and I always kind of accepted "guess this is how it works and I am just not smart enough to get it.") I never coded before, have been severly convinced I am bad at math und it seemed like dark magic but now I look at this little pill with 3D camera and feel proud and smart. :) Will definitly check out your other courses. Cheers!
Thank you for taking the time to make this, it has been extremely helpful
the way he explains every bit of code and guides us so well so we dont get lost. Wonderful tutorial and one of the best out there
Awesome tutorial! Easy to follow. The depth of explanation was just right. I’ll be checking out your other stuff for sure.
Wonderful tutorial! I'm very new to game development and I was finding myself becoming very discouraged after attempting a few other tutorials and getting super overwhelmed. This one was easy to follow along with, and I really appreciate how you explain in so much detail, rather than just giving us steps to copy. Will definitely be checking out the course.
This is very solid. I really appreciated the zooming and screen animations to highlight what you are doing
This is so well explained, woah! I like how you explain everything in detail its super helpful
Honestly one of the best tutorials I've seen. Really clear and well paced. Also the editing is clean and really helps to understand what's going on. Please keep them coming, definitely going to purchase your course once I've got the hang of this! Thank you!
this is a godsend. so glad to see high quality tutorials for godot :)
Amazing video man. Loved the amount of detail you included and your clear instructions.
incredible tutorial! Please continue making them! 🥺
This was a fantastic tutorial! The pacing was perfect for easy following and everything worked as advertised. It's just what I needed to finally get a start on my project and will provide a great foundation to build up from. Thanks!
dude this is feckin amazing. i have learned a lot from this, already expanding my knowledge on godot... added sprinting and jumping. chance i may have found doing so easier being a unity dev for 10 years but this has helped me learn this engine edit: fov broke, don't know what i did
please continue this series! i bet many will love this like me!
Excellent work. Very well done, and will purchase the course. Please continue the video series too!
I am currently working on a 3D-world grid-less turn-based RPG and this tutorial has been incredibly helpful in setting up the basis of what I am working towards. Thank you so much for this tutorial, you have no idea how helpful it has been!
Really appreciate the tutorial! I was feeling reaaally intimidated by learning gdscript and getting into godot in general as a beginner in game development and this made it feel so much better!
You Don't Know How Much This Helped Me!
The way you paced this video, and the contents, is pure gold...⭐⭐⭐⭐⭐
Please continue with these videos. Very well done,. Well paced and clearly explained without going in to too much detail straight from the get go. Perfect for me. Thanks a lot.
thank you so much man this really helped me its rare to find someone who actually explains how everything works
You explain it so well! I've been following you on my Godot! Thank you!
a beautiful and perfectly done tutorial. Everything is explained clearly, and very easy to follow. Thank you so much!
This tutorial is perfect, both for beginners and regulars. Thank you🙏
Amazing tutorial. Information dense, yet easy to follow.
Thank you man. Very hard to find a tutorial that is easy to follow
This is a fantastic tutorial, have learned a ton about Godot, and inspired on various approaches to improve my own tutorials. Great stuff!
Amazing tutorial, thank you!!
This is far and away the best guide I have found. I look forward to learning more from you.
Simply perfect. Right speed for a beginner, well explained. Subscribed.
Great tutorial! Looking at buying your course!
This was exceptionally well put together. One of the clearest and most helpful tutorials I've ever watched in general. I've worked in GameMaker for years now, but am considering how feasible it'd be to work in 3D in Godot in the future. Even though I didn't "follow along" with the engine open, I now have a really good sense for how Godot operates and it's actually pretty damn exciting. Definitely keen to give it a proper go now and see what I can russle up through prototyping at some point!
@NOFRILLS_GAMING
2 ай бұрын
same! Worked in gamemaker since overmars released it, way back in the stone age - totally agree with you on his presentation. It's gotten me back into it for sure
honestly I love your tutorials super easy to follow; thank you very much :)
I really appreciate how slow and steady this tutorial is. Exactly what I needed. Cheers to Day#2 of learning game dev !!
@CalamityIDK
3 ай бұрын
Me to
This was the best getting started video for godot I have seen!
This is super easy to follow and super helpful as well Thanks a lot my man
Really nice tutorial! Thank you for such a useful introduction to godot 4
That was clean and concise. I really learned some basic things I should have known a long time ago. This helped me get over the "this doesn't work, now everything sucks and this shouldn't be this complicated" bump
Great video, very comprehensible, great pacing, and great explanations.
Great tutorial! I'd love to see more videos like this on Godot.
Fantastic Tutorial! Great Work!
thank you very much for this video, this is the exact kind of camera style i want for my game, and even if i did find one like this before, all were outdated, so thank you
Thank you for the awesome tutorial! Godot is underappreciated.
thank you so much for linking the code in the description so we dont have to meticulously type out every character, it helps alot
This vid is edited uniquely superb. Thank you!!
My god, finally someone who told me how to do the mesh on the ground!! I was dying trying to figure it out. Subbed and liked, best tutorial by far.
one of if not the best intro tutorial i've experienced god damn
incredibly concise and calm
Very well put together video. Thank you
Great tutorial - well done!
jesus this is SO MUCH better than a lot of other godot tutorials, especially a lot of those weirdly high production value ones that YT pushes to the top of search results but are outdated and unclear. thank you so much for making this!
Amazing tutorial. I cannot describe how helpful and thorough this is. Thank you, sincerely.
Exceptional Video and Brilliant commentary. Thank you for all the help!
Dude, this is the best Godot 4 Tutorial I've found so far. Thank you very much !
Nice one! Thanks for this.
Thank you for the course. A very detailed explanation. Bought it
@BramwellWilliams
10 ай бұрын
Thankyou so much for the support!
@stefanbachmeier
10 ай бұрын
Same, world class Godot course and tutorials - please keep up the amazing work!
best beginner tutorial ever, thank you!
Thanks a lot for the tutorial. Just what I needed.
Yeah this is a really excellent tutorial. Like a few other commentors, I'm a Unity refugee and I super prefer this level of deep explanation about even the most simple concepts, it's so helpful to properly understand the tools. Thanks! (Also saw a semi recent 4 dev Game Jam of yours, kicked ass)
This is an amazingly instructive video, thank you for making it.
this is really really well done! and Ive watched / read alot of tutorials. thank you! I can finally make my blob wander through my wonderful 3d assets :-)
Great video, really clear and concise.
Thank you, very in depth with resources
What an utter gem of a channel. My game dev skills are so rusty they may as well be non-existent at this point. This was a fantastic and succinct tutorial to get anyone up and running fast. I learned some new tricks too!
Thank you so much !! It was very helpful!!!
This helped so much, thanks!
Amazing Video and straight to the point while ensuring everyone is following along. these are really that style of videos that i need. thank you so much. Only really introducing the things when they are relevant and giving a brief but yet detailed explanation on the things.
Nice and chill, conductive to learning.
So glad to see a rigidbody controller tutorial rather than kinematic. Excellent material, thank you!
just a great Tutorial you did there, that was not my first time of godot. But at the first Time i wasnt doing it properly so now i wanted to make a basic Project. Thanks again for that great Tutorial
Thank you for this great tutorial!
amazing video, you really got a knack for this
Awesome work thank you!
Thank you so much for making this video 🙏🙏🙏
Best starter 3D Godot tutorial I've seen yet. Thank you. I'll be buying the last sections too. Some feedback: In the code writing segments: The slow detailed explanations was really good in most of the tutorial, except for in the code writing segments without lots of pausing and rewinding. Please use one set way of writing the code and explaining - with steps - and tell us that this is how you will be explaining the writing of code at the start of the video, so it's a process to follow for learners each time a code writing segment comes up. E.g. Brief overview of what the code is for, before-while the video shows it being typed. -> PAUSE (showing all of the newly written code) to let people copy it and take it in (pausing a couple of times could even be helpful) -> Then go over the different parts in detail. I understand you can spam pause and rewind as much as you like, but sometimes there was just too much going on at the same time, descriptions and new code being added, with a cut to a new scene without time to process what's going on. Why in this order? When I've been doing these tutorials it has helped me learn to hear a brief overview -> copy the code myself, because when you're writing it yourself it forces your brain to figure out which parts are doing what and where the values for the variables are coming from, etc. Then the actual proper explanation of what's going on tells you if you're right or wrong. Writing the code as a newcomer is also the most stressful part of learning game engines. Making it more orderly also allows time for taking notes, as in the segments I was always back and forth over one sentence. Thx again. :)
adding comment half way through this is definitely very in-depth which is the kind of tutorial I like best especially if you using a program for the first time
I have a lot of trouble understanding and picking things up, especially coding but this video explained it in a way that while still a bit confusing (for me personally) was still able to interpret better than other videos, plus I've made more progress in the hour I've spent on godot watching your videos than the 2 months I spent following stupid Unity guides! I really hope to see more videos because a video format is easier for me to follow than a written one (I have ADHD and a tiny bit of the 'tism so following/remembering instructions isn'y my strong suit) but thank you for making it so new user friendly :)
This is a fantastic tutorial for a beginner like me. Switching from Unity to Godot feels like magic to me (ironically). I now consider Godot as my second home. Thank you for this wonderful tutorial.
thanks man you have great tempo and a very pleasant voice
Your voice is relaxing and you're great at teaching. Keep it up!
10/10 tutorial for beginners, absolutely perfect for me as someone who has never used game engines or even done basic coding
You speak really well and your teaching method is very effective. Thanks for the video, I'll be following you! Another subscriber.
I'm new to 3D, and this is very helpful. Thank you.