Make your first 3D Platformer in Godot 4: Setup, Movement, and Camera Controls

248,560
0
Published 2023-07-25
🔗 Code link: gist.github.com/bramreth/d9634f4cbbb96f9273622f5c7…
📰 Check out my Godot 4 course sale here! itch.io/s/99395/how-to-make-a-3d-platfomer-in-godo…

✨ Socials ✨
🐦 Twitter: twitter.com/bramreth
💬 Discord: discord.gg/YjhM98xZkY
🥰 Patreon: www.patreon.com/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

All Comments (21)
  • @adman123
    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!
  • @koni.K
    As a unity refugee this is very useful
  • @d_mb
    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.
  • @Assortment54321
    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.
  • @jonafin_gd
    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"
  • @builderchad1
    I found this to have a great pace and level of detail for me. Your editing and commentry are also excellent. Thank you.
  • @seppoday
    In 4.2+ "Lock rotation" is under "Deactivation" in RigidBody inspector.
  • @pmbdk
    As a complete noob I have to say this is the best tutorial I have bern through! Please, please do more!
  • @almond_robin
    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.
  • @scorpi0uk
    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
  • @mgames1710
    So... we're all here after the BS pulled by Unity the other day huh 😂
  • @matthuber6270
    Dude this is a really well-made tutorial! You explain everything so well and it doesn't feel too fast or too slow.
  • @SYWolf379
    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!
  • @Snyper-if3kt
    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.👍
  • @RaubeR666
    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.
  • @user-py4zl1hk5k
    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.
  • 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.
  • @guitarmanlevi97
    Awesome tutorial! Easy to follow. The depth of explanation was just right. I’ll be checking out your other stuff for sure.
  • @MacMiggity
    This is very solid. I really appreciated the zooming and screen animations to highlight what you are doing
  • @Ebbe010
    this might be the only tutorial on the internet that isn't so slow that you get bored and quit, but also explains what tf you're doing. 11/10!