How to make a 3D platformer in Godot 4

Ғылым және технология

This tutorial uses Godot 4 Beta 8.
Link to Mario: sketchfab.com/3d-models/mario...
Link to animation tutorial: • Godot 4 - Make your ow...
- you can follow this Mixamo tutorial but you won't have to make the library but just import it straight into Godot
Follow me:
Twitch: / aj08coderwastaken
Twitter: / aj08coder
Itch.io: aj08coder.itch.io/
GitHub: github.com/AJ08Coder
Discord Server: / discord
I like to make games and do game jams so go check out some of them at my itch.io! I used to do unity but then I decided to hate unity and go to Godot! Hopefully, you enjoy my content, and if you want to give me feedback on my videos, comment below!
Thanks to game endeavor, poly mars, and Dani for inspiring me, I used to do unity but I switched to the Godot game engine. GD script 4, Godot 4, four

Пікірлер: 108

  • @honzosaurus42069-no_furry
    @honzosaurus42069-no_furry9 ай бұрын

    Bro teached me more in 6 minutes than I could learn in a 40 minute tutorial 👍

  • @johnnobon
    @johnnobon Жыл бұрын

    Wow, I did not realize that Godot gives you a starter script for character controllers. That is really awesome actually.

  • @0127MAKEITRAINMCRITISISM_

    @0127MAKEITRAINMCRITISISM_

    9 ай бұрын

    i didn't get it

  • @JustBasicAnimator

    @JustBasicAnimator

    9 ай бұрын

    it means it gives you free code that makes your basic movement@@0127MAKEITRAINMCRITISISM_

  • @darthtechnologies553

    @darthtechnologies553

    8 ай бұрын

    Its open source, of course it would 😂

  • @madlink3495

    @madlink3495

    5 ай бұрын

    @@0127MAKEITRAINMCRITISISM_ when attaching the script for the node CharacterBody3D godot gives you the option to use the default script that contains the code the video didn't have to add.

  • @ChinchillaBONK
    @ChinchillaBONK9 ай бұрын

    Thank you for zooming in on important portions when needed!

  • @CibuYT
    @CibuYT9 ай бұрын

    amazing tutorial, straight to the point, works fine, love it

  • @cupofdirtfordinner
    @cupofdirtfordinner Жыл бұрын

    thanks man, this is a great tutorial!

  • @vpsip123
    @vpsip1237 ай бұрын

    Love how straight to the point this is- would love more 3D game tutorials by you (adding enemies, moving platforms, different movement mechanics- whatever comes to mind)

  • @vpsip123

    @vpsip123

    7 ай бұрын

    Ok as i followed step by step i went to move the character into the world scene i noticed i didnt have a player.tscn like you did- so i was unable to keep going… but overall still like that the tutorial helped me get my hands on godot quicker, just wish some stuff had notes on screen or something

  • @vpsip123

    @vpsip123

    7 ай бұрын

    Wait im silly i just needed to save the player scene (keeping these rambling comments up for anyone else going thru the same things)

  • @crabbite3093
    @crabbite3093 Жыл бұрын

    tysm keep it up man !! fast and easy to understand !

  • @pierrenagonio1120
    @pierrenagonio1120 Жыл бұрын

    THX for updated version of Miziziziz video: "How to make a 3D platformer in Godot in 8 minutes". Apretiate Your work Friend!

  • @trey3714
    @trey3714 Жыл бұрын

    First Godot tutorial I found that wasn't outdated. Thanks so much!

  • @jameshpotato2675
    @jameshpotato267511 ай бұрын

    Is there a part 2? How to add more levels, enemies etc.

  • @markstumbris7824
    @markstumbris7824 Жыл бұрын

    Spent 2 days on that Kinematic Body change to 3DCharacter, the Blender to Godot animations rock though. Also finding more info right in the editor👌

  • @darthtechnologies553

    @darthtechnologies553

    8 ай бұрын

    Are you using a library or something you self rolled??

  • @TheRealKaiProton
    @TheRealKaiProton9 ай бұрын

    That was a great starting point, no arsing about, straight into the video and not too full of waffle,

  • @PikaDevs
    @PikaDevs11 ай бұрын

    C# code for anyone who's decided to start with c# - the quirks are that you can't access .x and .y directly of vectors (and .z), rather you need to make a temp variable and make the changes there, then reassign. There's also a few other quirks using Godot; using System; public partial class PlayerController : CharacterBody3D { public const float Speed = 5.0f; public const float JumpVelocity = 4.5f; Node3D CameraBase = null; float CAMERA_SENSITIVITY = 1.0f; // Get the gravity from the project settings to be synced with RigidBody nodes. public float gravity = ProjectSettings.GetSetting("physics/3d/default_gravity").AsSingle(); public override void _Ready() { Input.MouseMode = Input.MouseModeEnum.Captured; CameraBase = GetNode("CameraBase"); } public override void _UnhandledInput(InputEvent @event) { if (@event is InputEventMouseMotion MouseMotion) { Vector3 CameraRotation = CameraBase.Rotation; CameraRotation.X -= Mathf.DegToRad(MouseMotion.Relative.Y) * CAMERA_SENSITIVITY; CameraRotation.X = Mathf.Clamp(CameraRotation.X, Mathf.DegToRad(-90), Mathf.DegToRad(90)); Vector3 CharacterRotation = Rotation; CharacterRotation.Y -= Mathf.DegToRad(MouseMotion.Relative.X) * CAMERA_SENSITIVITY; CameraBase.Rotation = CameraRotation; Rotation = CharacterRotation; } } public override void _PhysicsProcess(double delta) { Vector3 velocity = Velocity; // Add the gravity. if (!IsOnFloor()) velocity.Y -= gravity * (float)delta; // Handle Jump. if (Input.IsActionJustPressed("Jump") && IsOnFloor()) velocity.Y = JumpVelocity; // Get the input direction and handle the movement/deceleration. // As good practice, you should replace UI actions with custom gameplay actions. Vector2 inputDir = Input.GetVector("Left", "Right", "Forward", "Backward"); Vector3 direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized(); if (direction != Vector3.Zero) { velocity.X = direction.X * Speed; velocity.Z = direction.Z * Speed; } else { velocity.X = Mathf.MoveToward(Velocity.X, 0, Speed); velocity.Z = Mathf.MoveToward(Velocity.Z, 0, Speed); } Velocity = velocity; MoveAndSlide(); } }

  • @JustBasicAnimator

    @JustBasicAnimator

    9 ай бұрын

    thx

  • @CarlosRulaiiz
    @CarlosRulaiiz4 ай бұрын

    thank you and keep going bro

  • @super8bitable
    @super8bitable Жыл бұрын

    How would I go about adding a landing animation?

  • @miusoft
    @miusoft9 ай бұрын

    awesome🔥🔥

  • @Cold987
    @Cold9874 ай бұрын

    where did you got the player from???

  • @spielville8742
    @spielville8742 Жыл бұрын

    Great stuff. Would you consider doing a complete platformer with enemies, environment, physics or puzzles out of this?

  • @aj08coder

    @aj08coder

    Жыл бұрын

    Right now I'm working on other projects but maybe I will try that. Thanks for the suggestion

  • @Wonkabonka

    @Wonkabonka

    Жыл бұрын

    There's a guy who made a tutorial for how to do buttons i think. You can use the same logic to make puzzles easily. Good luck!

  • @Czif
    @CzifАй бұрын

    great tutorial

  • @aj08coder

    @aj08coder

    Ай бұрын

    Thanks!

  • @quadzers5703
    @quadzers5703 Жыл бұрын

    0:24 at this jump cut you added a camera and a tscn file. I understand how to get the camera but how did you add the tscn file?

  • @aj08coder

    @aj08coder

    Жыл бұрын

    I saved the scene and named it player

  • @alan112223
    @alan11222310 ай бұрын

    Cool! Thank you

  • @sillyapple3828
    @sillyapple382824 күн бұрын

    how do i get the code on these other lines at 3:41?

  • @droidburner
    @droidburner Жыл бұрын

    Gr8 bro 🎉🎉🎉❤

  • @franquealencar
    @franquealencar Жыл бұрын

    Very good video, congratulations! I'm starting to learn godot, but is it still worth it for me to learn godot in version 3.5 or should I wait for version 4.0 to come out? does it change much? Can you give me any tips on how to learn and use GDScripts in a simple way to use them in the creation of games on godot, because I don't have that knowledge and congratulations for the video.

  • @aj08coder

    @aj08coder

    Жыл бұрын

    Starting to learn Godot 3.5 is a good choice if you're eager to start making games and don't want to wait for version 4.0, which is still in development. GDScript will change in Godot 4 but not that much to wait for Godot 4 so you might as well start now. To learn GDScript, I recommend going through the Godot documentation, exploring sample projects, and watching tutorials on what you specifically want to do with your engine. Good luck with your learning journey!

  • @franquealencar

    @franquealencar

    Жыл бұрын

    @@aj08coder Thank you so much man, for your words, for your opinion and your tips, this video was amazing and I really want to learn something similar to what you did, creating the character controls. Thanks and success on the youtube channel and in your life!

  • @Comingunderthebridge-fu3rl
    @Comingunderthebridge-fu3rl Жыл бұрын

    Dude I did everything u did but when I try running it it says “characterbody3d cannot be attached to node3d”

  • @Agent_008
    @Agent_0082 ай бұрын

    The ninjas are coming

  • @justingrassmyer4747
    @justingrassmyer4747 Жыл бұрын

    why do I keep getting a node configure warning for static body 3d telling me to change the size in the child nodes, but when I do, the player simply falls through?

  • @tylershanegriffin5302

    @tylershanegriffin5302

    Жыл бұрын

    I had the same problem but I set the staticbody's scale to 1,1,1 and then changed the child size to update the parent.

  • @user-jp3cg3wf9v
    @user-jp3cg3wf9v8 ай бұрын

    Im doing everything you are doing but the camera just doesn't work, its not giving any errors and it runs just fine but its just that the mouse and the camera dont work

  • @SovereignVis
    @SovereignVis Жыл бұрын

    The files in the download link are completely different from what is shown on screen. 😅 I tried those files anyways but there was no animation player in the list. And after adding in one there doesn't seem to be any animations at all. So can't do this tutorial past the 'New Inherited Scene' step. That is where it all just hits the wall. 😑

  • @WeirdWimp

    @WeirdWimp

    4 күн бұрын

    Just do the ones on screen

  • @WhyIsSveenyTaken
    @WhyIsSveenyTaken4 ай бұрын

    for some reason when i move my mouse it tilts the screen? can someone help

  • @TheOnlyGhxst
    @TheOnlyGhxst Жыл бұрын

    don't know if it's because of changes to Godot, but when I add the camerabase it does not rotate around the character that way his does in the video, it just rotates the camera normally.

  • @jikkermanccini

    @jikkermanccini

    Жыл бұрын

    You're lucky, even with a 1:1 replica of the video code, the camera he wrote just won't work for me.

  • @Wonkabonka

    @Wonkabonka

    Жыл бұрын

    A cool camera you can make is the kidscancode chase camera. But remember to have the camera in the scene not the player. And nodepath means clicking on the camera, looking at the bar on the right and click nodepath, set it to the player

  • @WeirdWimp

    @WeirdWimp

    4 күн бұрын

    It works for me and I use latest version

  • @capybarba1213
    @capybarba1213Ай бұрын

    hey um i having some issues. And the issue is when i tilt my camera up or down it starts glitching out crazy and my up and down is inverted

  • @WeirdWimp

    @WeirdWimp

    4 күн бұрын

    I had the problem too, switch the x and y axis, I remember there was one part you shouldn’t switch but I forgot

  • @aurlb1537
    @aurlb1537 Жыл бұрын

    thanks a lot

  • @spid3rrblx
    @spid3rrblx7 ай бұрын

    for some reason while animating, i keep getting an error “attempt to call function ‘play’ in base ‘null instance’

  • @goutamdas6737

    @goutamdas6737

    3 ай бұрын

    I got the same error

  • @user-yg8yp8kx5e
    @user-yg8yp8kx5e9 ай бұрын

    How to jumping on moving platforms?

  • @rapex2729
    @rapex272927 күн бұрын

    You helped me to make my dreams become true!!

  • @badmusicproducer_offical
    @badmusicproducer_offical11 ай бұрын

    im getting an error at 3:40 it says that the "if" part needs to have a : after it but when i add it everything else breaks

  • @WeirdWimp

    @WeirdWimp

    4 күн бұрын

    Not just after the if like “if: Input.blablah(stuff)” instead after the whole line like “if Input.blablah(stuff):”

  • @Xanpeice
    @Xanpeice Жыл бұрын

    Pls I need help😢 on the line that says rotation.y -= and so on it is showing me an error and it says Expecting closing “)” after call argument any help with this but over all this was a great video and helped a lot

  • @aj08coder

    @aj08coder

    Жыл бұрын

    it seems like there might be a syntax error in your code. Without seeing the code, it's hard for me to see the exact issue, but make sure you have closed all parentheses properly or not accidentally added a '(' without closing it

  • @jikkermanccini
    @jikkermanccini Жыл бұрын

    I'm getting this error: E 0:01:27:0401 get_node_or_null: Can't use get_node() with absolute paths from outside the active scene tree. Condition "!data.inside_tree && p_path.is_absolute()" is true. Returning: nullptr scene/main/node.cpp:1272 @ get_node_or_null() When I try to run the program to test. I'm at the stage before lighting is added, so the first test. I'm pretty sure I've copies everything to a T.

  • @tranzok538
    @tranzok538 Жыл бұрын

    pls tell how to make a uniform scale

  • @Typischerdev
    @Typischerdev4 ай бұрын

    awesome video but how do i add respawning and stuff so if the player falls off the platform he respawns

  • @WeirdWimp

    @WeirdWimp

    4 күн бұрын

    Have an area 3d under your world that sends you back to your worlds scene when you touch it

  • @luckykid100
    @luckykid10011 ай бұрын

    The shape doesn’t spawn for me but I did everything you did

  • @hadithani6111
    @hadithani61117 ай бұрын

    I understood everything except for deg to rad what is that?

  • @mintafterhours
    @mintafterhours7 ай бұрын

    bro hit puberty

  • @bonsaipropaganda
    @bonsaipropaganda7 ай бұрын

    literally best so fast but i wish you'd explain the mouse code

  • @-smile-1
    @-smile-18 ай бұрын

    When i finished this and i tired it i fell right through the floor, but i continued anyway but still i fall through the floor how to fix

  • @aj08coder

    @aj08coder

    8 ай бұрын

    Make sure your player and floor had collisions and make sure the floor is a static body

  • @-smile-1

    @-smile-1

    8 ай бұрын

    @@aj08coder yep,yep i figured that out yesterday only tyysmmm thoo! Also how do i make levels? And after following this tut i made the camera in front of the player so it would be firdt person and i downloaded dungeons parts (asset) frim the asset lib, but u walk right through them, i know i have to add collisions but to add it to each single asset is toooo much is there a way it can happen automatically?

  • @-smile-1

    @-smile-1

    8 ай бұрын

    @@aj08coder also tysm ur 6 min tutorial was wayy better than watch this other 40 minute tutorial as urs was faster and worked wayy better, also i cant move my player with wasd only arrow keys idk why i made those things W A S D move_front ect. Ect. But maybe something in my code can u help fix?

  • @RackteamSuper
    @RackteamSuper6 ай бұрын

    mine is having a error

  • @WeirdWimp
    @WeirdWimp4 күн бұрын

    The jump animation doesn’t work

  • @Boblight69
    @Boblight69 Жыл бұрын

    speedrun?

  • @LastPahlawan
    @LastPahlawan8 ай бұрын

    dam bro. u should make more tutorial . other tutorial so fast and so long for beginner . i keep thinking on how to add the scene into the node. and you just drag and drop into the node.

  • @micheledicecioc
    @micheledicecioc7 ай бұрын

    How do i exit from the scene with no mouse:( Cool tutorial btw

  • @WhyIsSveenyTaken

    @WhyIsSveenyTaken

    4 ай бұрын

    Just press the windows button and hover over the godot editor

  • @Txmasiiik
    @Txmasiiik8 ай бұрын

    Thats not working when im trying to run current scene it giving me error called script inherits from native type characterbody3d bla bla it cant be assigned to object of type node3d

  • @WeirdWimp

    @WeirdWimp

    4 күн бұрын

    You have to right click the node 3d the inherited scene starts from, change type, and change it to character body 3d. That should work.

  • @tarmovest793
    @tarmovest793 Жыл бұрын

    Sorry bot the camera did not work it just stais as it is

  • @LuffyYT2022
    @LuffyYT202210 ай бұрын

    when i test the game the player falls down why ?

  • @Arcadoe

    @Arcadoe

    9 ай бұрын

    Did you use a collisionshape3d node?

  • @inconsistent_dg
    @inconsistent_dg Жыл бұрын

    i do wish you would slow down

  • @user-kt2ki3mh6y
    @user-kt2ki3mh6y11 ай бұрын

    FOR THE LOVE ALL THAT IS HOLY PLEASE SLOW DOWN. Pretty good tutorial other wise 9/10. {:

  • @fistofdoom2657
    @fistofdoom2657 Жыл бұрын

    Will it work in godot3?

  • @Kio_Kurashi
    @Kio_Kurashi Жыл бұрын

    Would be nice if this movement wasn't constrained to have the camera right behind the player and could instead have the player move independant of the camera.

  • @aj08coder

    @aj08coder

    Жыл бұрын

    Yeah I might try that

  • @generrosity

    @generrosity

    Жыл бұрын

    I imagine it's "as easy" as changing the part where you mention the mouse rotates the whole model, and just apply to the camera arm instead? Then think about how games have a delay before returning the camera, etc 😊😵‍💫

  • @tafarachikumira3717

    @tafarachikumira3717

    9 ай бұрын

    ​@@generrosity😂😊😮😮😢❤😢

  • @SharkyBro952
    @SharkyBro952 Жыл бұрын

    how to get collision and mesh instance at 0:13 youare too fast

  • @potatoman7037

    @potatoman7037

    Жыл бұрын

    I wondered the same

  • @dreamweddingentertainment
    @dreamweddingentertainment Жыл бұрын

    you go way too fast you need to slow down your tutorial

  • @MH-dn3jz

    @MH-dn3jz

    Жыл бұрын

    Yup. Agree.

  • @darthtechnologies553

    @darthtechnologies553

    8 ай бұрын

    There is a speed setting on youtube if you cant keep up.

  • @DogeMan-wy9go
    @DogeMan-wy9go Жыл бұрын

    AAAAAHHHHHHH IT WONT LET ME SCALE THE LEVEL IT JUST MAKES IT ALL THE SAME

  • @canhedotricks6078
    @canhedotricks6078 Жыл бұрын

    Camera is very janky.

  • @PocketDeerBoy
    @PocketDeerBoyАй бұрын

    Thanks, the code instantly crashes everything forever. Doesn't work. Broken.

  • @WeirdWimp

    @WeirdWimp

    4 күн бұрын

    It should work, you have to do everything exactly as they did jot it to work. The file won’t open if there’s even one error.

  • @wexordante
    @wexordante Жыл бұрын

    I want see your script, in one moment your script exchanged, lol

  • @ELAZA
    @ELAZA Жыл бұрын

    please make a tutorial series about making a Garten of Banban game :) pleaseee!! I can give you some skins and animations :P if you need them.. I want to learn that!!!

  • @vanhelsingx69x
    @vanhelsingx69x4 ай бұрын

    Dont recommend this tutorial for beginners. You have to have some knowledge about godot before

  • @SaysAnX
    @SaysAnX Жыл бұрын

    Chafa

  • @lukeisthebestguy
    @lukeisthebestguy11 ай бұрын

    i cant drag the player into the world, player.tscn isnt there more me EDIT: i found out all i had to do was save lol EDIT 30 MINUTES LATER: game wont work idk

Келесі