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

preview_player
Показать описание
Time for a 3D Godot tutorial! Learn how to make a character move smoothly in 3D: Walk, run, jump and fall. This one is a third person character controller you can reuse in your projects.

You can build on this cute little demo, (I call it "Starry Canyon") to create your own levels and maybe even a mini-race for Sophia!
Let's go!

------------------------------------------

0:01 What you learn in this tutorial
0:43 60s roadmap to get started in Godot 4
0:46 Become an independent gamedev with GDQuest
1:05 Download the tutorial project
2:00 Character Controller vs Character skin
2:28 RigidBody3D vs CharacterBody3D? What's the difference?
4:19 Choosing a collision shape for 3D characters? Why capsules?
8:15 Add a camera and set it up
18:54 Move the character on the ground
23:50 Hook up ground movement to character model
28:15 Make the character jump and fall
30:53 Hook up jump and fall to character model
32:00 Learning Gamedev with GDQuest

#godot #tutorial #gamedev #3dgames

-------------------------------------------
*CC-BY 4.0 LICENSE*
Рекомендации по теме
Комментарии
Автор

This is such a good tutorial!! Just enough explanations on why we use a certain function or line in script for even a beginner like me to follow along. Thank you!

fairy
Автор

One thing to note: by default Godot uses the negative Z axis as its "front-facing" axis, so you'll want your character models to face that direction when you make them in another program. This is why, for example, you had to rotate everything you add to the scene by 180 degrees.
EDIT: it's also why you had to use BACK to invert the direction's vector. Basically your character is facing backwards, and instead of turning it you're turning everything else you create afterwards, which is a bit fiddly.
EDIT2: also you seem to have skipped a lot of pages when it came to the animations. You went "I already have these move() functions made" and glossed over the whole thing.

I still managed to obtain valuable information, and for that I thank you, but I had to do a lot of fine-tuning on my side to get it working correctly.

TheFilipFonky
Автор

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.

nostalgianinja
Автор

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! 🙂

computersciencestudentriverbat
Автор

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!

cranni
Автор

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

IsaqueSbr
Автор

If the inverted Y is throwing you off, on line 76 of the player_3d_template simply change the += to -=
Then you will look up with you move your mouse up and down when you move it down.

TheLoneBit
Автор

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

pipeliner
Автор

Thank you so much! This was very helpful!

blaezgd
Автор

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.

Plantgrowth
Автор

The quality keeps getting better~Great job!

JasonKim
Автор

12:26 I don't think you want to multiply by delta here. There is nothing time dependent about mouse movement. When the player moves the mouse a certain distance on their desk, that should always rotate the camera a corresponding angle, regardless of how fast or slow they moved the mouse (unlike a joystick, where time does matter).

If the game can keep a perfectly steady frame rate, the player won't notice the multiplication by delta, since it's basically a constant at that point, but if the fps starts to fluctuate, camera control can feel a bit off.

greyly_
Автор

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.

ithinklikeawesome
Автор

This is a beautiful tutorial, the best, simple, 3D character tutorial I've seen, thanks for sharing. Also when following along with my own project (not using your project files), at 26:37, inside of the lerp_angle() function, I had to use _skin.global_rotation.y rather than the shown _skin.rotation.y, I don't fully know why, but if I didn't, my character mesh would rotate at the speed of light.

Kry
Автор

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

rzoom
Автор

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

cintrond
Автор

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

mercurio-jxwc
Автор

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

NekoPatty
Автор

Just found your channel, genuinely a shame that your views aren’t in the millions. Maybe in 5 years they will be!

imethanOW
Автор

Very nice. Looking forward to see you at GodotCon 😊

Thomas_Lo