3D TUTORIAL: Achieve Smooth 3D Movement in Godot 4

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024

Комментарии • 91

  • @nostalgianinja
    @nostalgianinja Месяц назад +33

    This dropped just in time for me to redo my character controller after a flawed one I wrote a couple of months back... Will follow along shortly.

  • @computersciencestudentriverbat
    @computersciencestudentriverbat Месяц назад +15

    GDQuest has been one of the best resources for learning Godot and in-general game development knowledge. GDQuest is truly one of the biggest and best-est contributors to helping beginners and intermediates improve their skills. Great work GDQuest and Crew! 🙂

  • @cranni
    @cranni Месяц назад +16

    THANK YOU SO MUCH! I just started learning Godot (As well as programming in general) and I've been trying to make a 3D Character Controller for DAYS! This literally couldn't have dropped at a better time!

  • @rzoom895
    @rzoom895 Месяц назад +12

    Look who's back in the house .🔥🔥🗣🗣

  • @IsaqueSbr
    @IsaqueSbr Месяц назад +5

    Man, i can totally see me coming back to rhis video, i just thankful that we have such high quality godot content ;)

  • @BurntToast487
    @BurntToast487 Месяц назад +14

    We're so back

  • @blaezgd
    @blaezgd Месяц назад +12

    Thank you so much! This was very helpful!

  • @pipeliner8969
    @pipeliner8969 Месяц назад +7

    I bought all of your courses, you are doing a great job!

    • @Vegan_Kebab_In_My_Hand
      @Vegan_Kebab_In_My_Hand Месяц назад +1

      Yup, they are some of the best out there!

    • @Gdquest
      @Gdquest  Месяц назад +3

      We're so glad to read this. It's been a year of nonstop work and it's not about to let off so thank you!
      Your opinion may also help others look up the difference between GDQuest courses and other resources available out there for gamedev.

    • @pipeliner8969
      @pipeliner8969 Месяц назад +1

      @@Gdquest the explanations are really good. It's rare to see courses like that. I tried two Unity courses in the past and stopped because they were too technical and it was hard for me to follow along

  • @ithinklikeawesome
    @ithinklikeawesome Месяц назад

    I have already got the great godot 4 starter kit and I have to say I am loving it (Quite possibly the best game dev tutorial series ever) but waiting for new tutorials is always a bit frustrating (not that I want the tutorials to be rushed EVER) but mini tutorials like these that actually showcase how to do just one mechanic rather than an entire games is quite possibly the best way to spend time as I wait for new modules. If you guys are comfortable doing this I would probably not be able to miss an upload from you guys ever.

  • @Plantgrowth
    @Plantgrowth 24 дня назад

    I had a perfectly working character controller for the player, but it was handling the player velocity and acceleration by lerping the values. Not a problem per say. It worked just fine and without issues and there was no need to re-do everything. But I desperately wanted to attach the velocity and acceleration to move_towards() function for a slightly different acceleration method, but no matter what I tried, I couldn't make it work. Followed a couple of tutorials just to refresh my brain on how other people build their player controllers and none of them would work well enough. All of them causing jittery movement at low FPS values.
    My project is capped at 24 FPS for aesthetic reasons and then I find this bit here. All fresh and new and it has the answer to my problem. Now my player controller has a shiny new movement script which is based on what you did on the video here and it works even better than the one I had before. I mean, it feels the same while you play and nothing seemingly has changed, but the lovely numbers being printed in the debug box tell a different tale.
    Thanks, man! Amazing tutorial.

  • @drawtheword7590
    @drawtheword7590 28 дней назад +1

    a good explanation on the directions
    ty

  • @cintron3d
    @cintron3d Месяц назад +2

    Nice! Can't wait to dig into this one! Thank you so much!

  • @mercurio-jx2wc
    @mercurio-jx2wc 28 дней назад +1

    Congratulations on the success of your game brotato... you deserve it!

    • @Gdquest
      @Gdquest  26 дней назад +1

      GDQuest didn't make Brotato but @blobfishdev who did, would most likely be glad to read this! It's kind of you to congratulate others on their successes. Thanks!

  • @NekoPatty06
    @NekoPatty06 Месяц назад

    For when I begin my Game's Timeline Series in 3D, I'm using Godot 3D so these videos are really helpful

  • @Thomas_Lo
    @Thomas_Lo Месяц назад +1

    Very nice. Looking forward to see you at GodotCon 😊

  • @dermond
    @dermond Месяц назад +3

    Nice to see you again

  • @braindeadbzh
    @braindeadbzh Месяц назад

    This tutorial is unbelievably good. 👌
    Thanks

  • @Weahl
    @Weahl Месяц назад

    Was missing a new video! I wish I can have some time soon to fully watch it ❤

  • @oli_p_3d
    @oli_p_3d 23 дня назад +1

    This was super helpful. Thank you 😊. I got super confused on the target angle bit. I didn't understand the signed angle to but and what that did haha. And the jump bit was so confusing, how come we had to set velocity y to 0? Is it possible to use a set up similar to the character3d template script when applying gravity when is not on floor? If that makes sense. I have a lot of learning to do lol

  • @Eroax
    @Eroax 25 дней назад +2

    Probably a dumb question, but I'm a little confused on why the mouse_mode == MOUSE_MODE_CAPTURED is there. In the video you mention it's to stop input from passing to the window when it's not focused. But unless I'm missing something _unhandled_input, or just _input for that matter does that automatically?
    Edit: Also I sanity checked thinking maybe Godot changes Input.mouse_mode when you unfocus, but printing it in _process it's still MOUSE_MODE_CAPTURED. So I'm confused how that code does what was said in the video. Is it actually there as an extra layer against overriding UI inputs ?

  • @ArktikusYoutube
    @ArktikusYoutube 19 дней назад

    Perfect timing, just wanted to try out making a 3D Game :D

  • @computernerd8157
    @computernerd8157 Месяц назад

    Great Tutorial, hopefully , I can learn enough to make a cool project using this stuff, but for now, I will try to create another 2D Project while learning what I can.

  • @corbur0313
    @corbur0313 Месяц назад

    Oh lol I didnt know that this video just was upload yesterday. Today I just searched this and find a very good course

  • @raulnegron8301
    @raulnegron8301 25 дней назад

    Amazing!! saved me so much time

  • @snowpaw360
    @snowpaw360 Месяц назад +1

    Such a good video, dropping a like for the algorithm lol

  • @walttzbeatz3728
    @walttzbeatz3728 25 дней назад

    Wow!! Good stuff!!

  • @Daydam
    @Daydam Месяц назад

    Awesome tutorial, and just in time! Question: Is there a reason why you would want to rotate the skin and not the whole character?

  • @raildogameart
    @raildogameart Месяц назад +1

    I search for this and "posted 1h ago" its made for me?? lets goooo

  • @AverageNeovimEnjoyer
    @AverageNeovimEnjoyer Месяц назад

    The GOAT is back!

  • @ThunderPlayStudios
    @ThunderPlayStudios Месяц назад

    what a great time fo this tut

  • @ShimSlady120
    @ShimSlady120 Месяц назад

    OMG thanks!

  • @magicchannel9318
    @magicchannel9318 Месяц назад

    28:03 move_and_slide() does not work as expected if there is no gravity. At this point (before adding gravity), if we set the speed to 9.0, the character is no longer going down the stairs, but floating in the air.
    Thank you)

  • @magu291
    @magu291 Месяц назад

    Hello again, thanks!

  • @Y0N4N
    @Y0N4N 23 дня назад

    please bring a tutorial on turning this into multiplayer

  • @YigitKilicaslan
    @YigitKilicaslan 5 дней назад +1

    Or you can just use a template for third person

  • @fruitdudetv
    @fruitdudetv 5 дней назад +1

    anyone knows how i would make the character move slower left and right and move faster forward? or does this code only work by multiplying the move direction with a single value ? as soon as i write "velocity = velocity.move_toward(move_direction * Vector(1.0, 0,0, 2.0), acceleration * delta" it does something kinda funky to me, so when i turn ingame by 90% and walk forward the z velocity is still only 1.0 but it should be 2.0 no matter where i look? when i google this i only get results how people dont want different speeds depending if they move sideways or forward/backward so i'm kinda lost here :(

  • @super8bitable
    @super8bitable 25 дней назад

    27:22 Would’ve really been nice if you explained the state machine stuff so that people using their own models aren’t left behind here.

    • @Gdquest
      @Gdquest  24 дня назад +1

      It's beyond the scope of this video, but hopefully we'll get to cover animation trees in the future. It would need a dedicated video or article as it's independent from the character movement and there's quite a bit to say about it. The setup can depend quite a bit on how the artist made the model and animations.

  • @michaellambert5614
    @michaellambert5614 Месяц назад

    Fire tutorial I cap you not.

  • @tidusrodriguez5096
    @tidusrodriguez5096 Месяц назад

    For some reason, when using lerp_angle to smooth rotation, the character constantly spins forever. Any ideas? Great tutorial btw!

  • @neozoid7009
    @neozoid7009 Месяц назад +1

    Cool

  • @unoqualunque77
    @unoqualunque77 Месяц назад

    The project is supposed to play sounds... at least when the player jumps. But to me it makes no sound at all!
    Is it normal?

  • @karim8030
    @karim8030 11 дней назад

    I don't understand. The .screen_relative property used in this video with the InputEvent.... it doesn't exist

    • @Voperleed
      @Voperleed 5 дней назад

      im with the same issue, my godot is a bit older than the video but is still the godot 4. i cant make the code work because the screen relative returns as invalid
      edit: solved, the issue was the version

  • @epsilon7629
    @epsilon7629 Месяц назад

    Hi! could you do a small combat system tutorial? that would be really helpful

    • @Gdquest
      @Gdquest  Месяц назад

      Hi! Could you please describe the type of mechanic have in mind so I could take some notes? (Type of game with some references, whether you're referring to controls or enemy behavior, etc...) Thanks!

    • @DustedAsh3
      @DustedAsh3 Месяц назад +1

      @@Gdquest Gonna hijack this because I have the same request. :) A lot of tutorials exist for shooting combat, but I haven't seen much in the way of melee combat / combos in 3D, things of that nature. Something like Kingdom Heart's Sora's combat would be super helpful, though that is obviously well beyond the normal scope of a tutorial. Basic enemy AI utilizing a combo type combat would also be super helpful, but that would probably be a bit more advanced.

    • @epsilon7629
      @epsilon7629 17 дней назад

      ​​@@GdquestSorry for the late reply! I'm looking for a hack and slash, bow and arrow mechanism(Botw) and climbing onto the backs of large enemies(shadow of the colussus)

  • @-mixu-
    @-mixu- 29 дней назад

    Please, do a video about VisualSky scripts, it's a pain to convert something you do on blender into godot because all the peoples just do it in code
    It would make the process far more easier ,v,

  • @lolaccbroj1
    @lolaccbroj1 Месяц назад +1

    Why are you doing the camera pivot movement in physics_process instead of just process?

    • @Thomas_Lo
      @Thomas_Lo Месяц назад

      @@lolaccbroj1 consistency, otherwise input feel would be tied to framerate

    • @lolaccbroj1
      @lolaccbroj1 Месяц назад +1

      @@Thomas_Lo Maybe im dumb but isn't that what delta is for? we could do this code in process and multiply by delta so it's not tied to the framerate?

    • @Thomas_Lo
      @Thomas_Lo Месяц назад

      @@lolaccbroj1 you are not stupid, ofc you would use delta and thus get somewhat consistent behavior over a range of framerates. problems arise when there is stutter in the framerate or generally a slow down. Input delay goes up and so the input feel gets, well, bad. That's the theory. Incidentally it seems like Input polling is still in fact tied to the render thread in Godot. Just looked it up. My argument still holds true for physics based movements, but the camera could certainly be handled separately. I hope I am making any sense at all.

    • @Gdquest
      @Gdquest  Месяц назад +2

      Here, the camera movement is in physics process for simplicity. In Godot 4.3, on monitors with high refresh rates, moving the camera in the process loop can make it feel a bit smoother. But I prefered to show this simple approach and wait for physics interpolation, which is coming for 3D in Godot 4.4 I believe. Because even if you move the camera in the process loop, if the character moves in physics process, the character and camera motion will be slightly disjointed. You'd probably also want to interpolate the character position in _process(), and the code would be a little less straightforward for learning.

  • @viruschris3160
    @viruschris3160 Месяц назад

    So… anything close to KH2 level of controls yet? :P

  • @darkluxury55
    @darkluxury55 16 дней назад +1

    Gd script corues in Hindi language please sir 😢

  • @VanguardBelwing
    @VanguardBelwing 27 дней назад

    Hello, excellent tutorial, to the point and super easy to follow AND understand.
    Still, my model flickers between its correct animation/pose and a mirrored-oriented version of it. Everything seems to work except for this.
    The faulty part of the code, on my end:
    if move_direction.length() > 0.2:
    _last_input_direction = move_direction.normalized()
    var target_angle := Vector3.BACK.signed_angle_to(_last_input_direction, Vector3.UP)
    _skin.global_rotation.y = lerp_angle(_skin.rotation.y, target_angle, rotation_speed * delta)
    I am not too sure what to change here, anyone with a problem like that?

    • @saintpablo653
      @saintpablo653 6 дней назад +1

      Yeah i got the same problem idk why

  • @pietro8648
    @pietro8648 Месяц назад

    how do I make prototype levels like this one?

    • @akeem2983
      @akeem2983 Месяц назад +1

      In this case the level is made out of CSG nodes

  • @ItsHotdogFred
    @ItsHotdogFred Месяц назад +2

    crazy

  • @beetledjuice3062
    @beetledjuice3062 Месяц назад

  • @marcbotnope1728
    @marcbotnope1728 Месяц назад +19

    Godot is dead! Long live Redot!

    • @Gdquest
      @Gdquest  Месяц назад +54

      Code is the same, you can follow all the same tutorials. Have fun learning!

    • @majohime
      @majohime Месяц назад +12

      not dead though :)

    • @fabricio4794
      @fabricio4794 Месяц назад +5

      Godot Still Useful its a Tool.

    • @DamianCRWDctrl
      @DamianCRWDctrl Месяц назад +18

      Too bad Redot is a scam

    • @R41NB0
      @R41NB0 Месяц назад +28

      You took time out of your day to post this. Go make a game or something

  • @EloyLima1971
    @EloyLima1971 Месяц назад +3

    Thank you so much for this great tutorial!