Pro tip: when importing models from blender, if you put -col at the end of the name of the models in blender, Godot will automatically add a collider for the model when you import it!
@echoless you make a object duplicate it name your last object but add a dash at the end then colony like this yourobjectname-colonly click on the colony hold shift click on the normal object select parent object make sure the normal object is the parent and the colony is the child open up the objects children then click on colonly hold shift then click on the object file, export, collada, selection only put it in your go godots blender file.
Jesus ... i tried for a week to achieve this by trying to merge like 7 different tutorials from different people and different engine versions. This is absolutely perfect. Thank you so much 🥳
Thanks for the tutorial! You can add a springcamera3d to camera-mount, move, and child the camera3d to the springcamera3d, adjust the spring length to match your camera3d, and now you have object collision detection, so the camera3d does not go thru the objects.
If you get the error "Can't change loop mode on animation embedded in another scene.", I fixed this from the Animation window with "Animation" -> "Manage Animations..." -> Click the save icon -> "Make Unique"
Hi. Where did you click to get the "manage animations"? I fiddled around a bit but couldn't find that. I made the mixamo_base a scene, and then edited in that scene, which appears to be working.
hey. More specifically at the top of the animation window, around the middle, hovering the mouse over it and "animation tools" comes up. Clicking on it, manage is between new and duplicate. I'm on 4.1.1 (if that affects anything. It's hard to tell sometimes.) @@owenlloyd2528
@Lukky You stand out from the crowd of UA-camrs providing Godot tutorials because you explain the little things that most simply skip over, so you never know the reasons why things happen. Your tutorials, I dare say, educate those of us learning this game engine, in a way that we can take anything you show, and do what WE want to get done. I consider you among the top tier tutorial creators here. I'm looking forward to more videos from you in the future. Would you happen to post anything anywhere else on social media, such as Twitter? Would you happen to tinker around in Blender as well?
Thank you so much for the kind words 😊. Yes I'll post all my socials on me channel soon. ( Twitter is lukky_nl ). And yes I do use blender alot most of my games start as blender mockups actually :)
If anyone is having trouble with the camera controller around the 23:00 minute mark, where there character stops looking in the direction your camera is facing while moving. It may be because instead of visuals.look_at(position + direction) should actually be visuals.look_at(global_position + direction). For me the position command was outputting an increasing value no matter where I walked rather then referencing the global position. You can reverse engineer this issue by using the print_debug(position) line which then will print the variable on the screen when running the game. Good luck guys! also great video man!
I wanted to learn how to set this all up on a controller while going through the tutorial, and god, was it a nightmare. However, I am proud that I figured it out. This 100% isn't the best way to do this but it's what I figured out and works if anyone else is interested. (make sure to add your right stick inputs to the controller map for lookleft/right/up/down.) This goes after the camera movement part and before the jump action part. func _process(delta): rotate_y(deg_to_rad(Input.get_action_raw_strength("lookleft")*controllersense_horizontal)) rotate_y(deg_to_rad(-Input.get_action_raw_strength("lookright")*controllersense_horizontal)) visuals.rotate_y(deg_to_rad(-Input.get_action_raw_strength("lookleft")*controllersense_horizontal)) visuals.rotate_y(deg_to_rad(Input.get_action_raw_strength("lookright")*controllersense_horizontal)) camera_mount.rotate_x(deg_to_rad(Input.get_action_raw_strength("lookup")*controllersense_vertical)) camera_mount.rotate_x(deg_to_rad(-Input.get_action_raw_strength("lookdown")*controllersense_vertical)) I know there is a better way using "Input.get_vector()" but I couldn't figure out how to do it so this is what my brain made.
Great tutorial! One addition that people might find useful is clamping the camera angle i.e. setting a max / min angle so you can't make the camera go upside down. At 16:00 add the following in line 20 (under the camera_mount.rotation.x): camera_mount.rotation.x = clamp(camera_mount.rotation.x, deg_to_rad(-90), deg_to_rad(45)) (If you want you can set variables for CLAMP_MAX (-90) and CLAMP_MIN (45) and tweak them til you get what you want.)
I've watched a lot of videos recently trying to find a more updated tutorial mainly for changes in newer versions of Godot scripting etc, but have always found you to be the best at getting someone started!
Awesome! Super helpful and easy to understand; thank you! In the physics process, when checking if the kick button was just pressed, I'd add "and is_on_floor()" to prevent kicking mid-air.
Funny, I let it kick mid air for a jumping kick and had to allow move_and_slide so that gravity could take over. Then I slowed it down as it hit the floor again.
Hello, I am a friend in China, I am a newcomer to Godit, and I love Godot Your videos are great too! Godot is also popular in China! Especially after 4.0, every one of your videos is great and special! Hope to continue to produce great videos!
For all those who want visuals.look_at(position + direction) ore smoother, put this variable under the extends CharacterBody3D: const SMOOTH_SPEED = 10.0 Also below var direction := (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized() this other variable: var visual_dir = Vector3(input_dir.x, 0, input_dir.y).normalized() And finally instead of visuals.look_at(position + direction) this: visuals.rotation.y = lerp_angle(visuals.rotation.y, atan2(-visual_dir.x, -visual_dir.z), delta * SMOOTH_SPEED)
@@connorjade5460 Looks like visual_dir stores our input data (w,a,s,d) into a Vector3 var. Which we use in the lerp_angle() function to tell visuals.rotation.y where to lerp to.
So easy! Most tutorials use the AnimationNodeStateMachinePlayback or make their own multi state machine. Just set Default Blend Time and play the animation! THANKS
Thanks for the tutorial. I have a problem with the character getting tilted when I start moving at like 45 degrees. It happened after I wrote "visuals.look_at(position + direction)". Edit: I found this in the comment section "visuals.rotation.y = lerp_angle(visuals.rotation.y,position.angle_to(position+direction),delta*rotation_speed)" wich is an alternative to the first line of code allowing for smooth rotation, it also fixed my initial problem. If anyone has the same problem use this instead, just declare a new "var rotation_speed = 10" at the top and it worked fine.
im so happy i found ur channel, u actually go through theses things in such nice detail, and i also love the slower tone of the videos. Thank u so much
Thank you! This video moved me forward in my gamedev progress more than any of the tutorials I have watched on YT or paid for at other sources. Since I am an old man just entering gamedev at retirement (Dark Souls inspired gamer, sadly only discovering this art when Elden Ring was released), I have been trying to learn a lot of skills from drawing to coding, music, to modeling - so fun! I have not coded anything since my Fortran and Cobol days, (Pacal, C, Basic, etc...) and I sure wish there was a reference book for gdscript as opposed to the online documents, but my brain is finally starting to rewire for art and coding, despite my preferred learning method of books. With this little 3d controller tutorial I have been able to craft my real-world farm into godot with an adequate animated character model of myself. I decided that modeling my farm and working the farm with a 3d character would be a great way to learn gamedev fundamentals before venturing further. Oh, like a real fool, I modeled the terrain and building in Blender so that I could port them to both Ureal5 and godot to see which I prefer. Doing this made my head spin. I am sticking with godot for now, despite Unreal5 being much easier to set up the base farm and character, but I like coding, challenges and the small package of godot without the ridiculous delays and crashes of Unreal. Apologies for the long-winded comment but I am feeling more inspired and capable simply because of your excellent tutorial video.
I stumbled across your videos by accident - fantastic! on UA-cam, everyone is yelling and chattering so much in their videos. Starting to watch your videos at first I experienced an unusual sensation in my ears - as if I suddenly teleporting from a loud, noisy metropolis to the mountains, to calming nature. Your videos are just some educational ASMR. And most importantly, useful knowledge as a result. Please keep going 🙏! It's great. Huge respect for your work, man! Thank you.
for those who don't know how to move all locally created mixamo animations just use the model and skeleton from one of those nodes and in the animation player nodes of the other scenes just copy and paste it to the animation player node of your preference (it has to be only one) entering manage animations there you paste it by touching the portfolios, if it doesn't even let you copy it you have to save the scene with (ctrl+s) there it lets you do that, I'll let you know don't know much because I spent a whole day looking for how to do that and in the end I discovered it para los que no sepan cómo se mueve todas las animaciones de mixamo creadas localmente solo tienen que usar el modelo y el esqueleto de uno de esos nodos y en los nodos de animation player de las demás escenas solo tienen que copiarlo y pegarlo al nodo animation player de su preferencia (tiene que ser uno solo) entrando en manage animations ahí lo pegan tocando en el portafolios, si no les deja ni copiarlo tienen que guardar la escena con (ctrl+s) ahí les deja hacer eso, les aviso a los que no sepan mucho porque estuve un día entero buscando como hacer eso y al final lo descubrí yo
for a smoother character turn, instead of using look_at delete that and use this instead visuals.rotation.y = lerp_angle(visuals.rotation.y, atan2(direction.x, direction.z), delta * 8.0)
Thx you very much, not only i have learned how to set up 3rd person camera ( which was point of watching this video at first ) but also how to add animations , running and transitions.👍
I learn something new each time. By revisiting the math, composition, and each time with an updated understanding of the “why” from my progress outside the tutorial, I get better. And if nothing else, Lukky is ASMR. You’re just being an ass.
Greta video. Thanks a lot. I'm gonna need this for remaking my unity game into Godot. Thanks! Didn't know Godot was SO MUCH SIMPLER than unity. Your explanation was on point. Thanks a lot!
*If you don't want the visuals to snap to the directions, add these two lines of code instead of the tutorial code:* In _INPUT() add: visuals.rotate_y(deg_to_rad(event.relative.x*PUTSENSITIVITYHERE #
This video was very informative. I'd love more exploration on melee combat for third person. I'd love to build something akin to Fable/Kingdom of Almar/etc. ARPG basically, but not sure how to approach things like skill-set moves that do more than swing a sword. Such as teleportation, speed-dashes, dodge rolls. Any continuation on this tutorial for action combat would be super useful. Thanks for the tutorials.
@Lukky, wow! This is one of the best tutorials I have found, especially related to Godot. Looking forward to the next ones! Anything related to 3d games is great :D *It would be awesome to see how you set up the jumping animation with this style. It can be quite confusing to new people how to add extra animations with different requirements.
Very good tutorial! Dont forget guys: if the complexity of the character grows, try to implement a proper design pattern like state machine! Anyway, is an excellent starting point! Thx Lukky
love the vid, thanks for the lesson! Could give you a quick optimizing and code cleaning tip for the walk/run segment I found it better to make a dictionnary and a flag variable to handle the entire process (I made it a walk run toggle but if you make the flag true only when shift is held down, the result is the same). This could be a good way to teach how to use dictionnaries #Replace the speed values with whatever fits better for you const MOVEMENTS = [ { "animation": "walking", "speed": 1.725 }, { "animation": "running", "speed": 3.0 } ] var toggleRun = false in the physics process: #you can change the if with your hold key version if Input.is_action_just_pressed("toggleRun"): toggleRun = !toggleRun ... if direction: if animation_player.current_animation != MOVEMENTS[int(toggleRun)]["animation"]: animation_player.play(MOVEMENTS[int(toggleRun)]["animation"]) visuals.look_at(position + direction) velocity.x = direction.x * MOVEMENTS[int(toggleRun)]["speed"] velocity.z = direction.z * MOVEMENTS[int(toggleRun)]["speed"] else: if animation_player.current_animation != "idle": animation_player.play("idle") velocity.x = move_toward(velocity.x, 0, MOVEMENTS[int(toggleRun)]["speed"]) velocity.z = move_toward(velocity.z, 0, MOVEMENTS[int(toggleRun)]["speed"])
There is a jitter/shake when colliding with the boxes. That's because the floor is too wide causing imprecision in the physics engine. We have to subdivide the floor in smaller pieces or use WordBoundaryShape instead.
I thuroughjly enjoyed this tutorial :D I would like to see other tips and tricks for setting up 3rd person controls such as removing walking / running animation loop while in jump. but this solves 99% of what most beginners have to setup first. Anyways, keep up the excellent work! will be subscribing RN
Be great to se the FPS and Third controller merged into one tutorial where the player can swiitch the cameras and maybe a FREE camera where they can explore the world up until a certain distance away
I know, late comment, but I'd love to see a tutorial on how to add collision detection (hit/hurt box?) to the kick, so kicking a "target" would knock it back/over, and kicking a wall would maybe knock the player back or interrupt the animation.
@Lukky Thank you so much for this tutorial, it is a great addition to the community's array of learning resources. I have a special request, seeing you're aware of the Gears of War series - would you be willing to do a tutorial in Godot on how to create a Cover System similar to that seen in Gears?
If you kick in the middle of the air you stay floating in the air, and this occurs because the "move_and_slide" also affects the player's gravity. I fixed this removing the "if !is_locked" from the "move_and_slide()" and adding in the "_physics_process(delta)" this line of code: if is_locked: walking_speed = 0.0 running_speed = 0.0 JUMP_VELOCITY = 0.0 else: walking_speed = 3.0 running_speed = 5.0 JUMP_VELOCITY = 4.5 If anyone knows a better solution please comment.
32:05 - To contribute a bit, instead of the if !animation_player.is_playing(): unlocking fix, I did an "await" coroutine on the kick function. It goes.... animation_play("kick") locked = true await get_tree().create_timer(1.5).timeout locked = false ....which, to me, seems a bit more un-glitchable (perhaps debate-ably compared to a dedicated timer and/or state machine but this way fulfills one thing at a time principles).
if you want to stop the camera clipping inside things add a springarm3d as a child to the camera_mount node. then add the camera as a child of the springarm3d node. then set a distance on the springarm3d node.
Pro-tip, for "source engine" sensitivity standards, the number of degrees you turn per mouse dot is 0.022 by default. There's no agreed standard for this, but this is as close as you're going to get to a standard. e.g.: # standard source engine metrics var degrees_per_mouse_dot = 0.022 @export var mouse_sensitivity_x = 3 @export var mouse_sensitivity_y = 3 @export var mouse_invert_y = false @export var mouse_invert_x = false func _input(event): if( event is InputEventMouseMotion ): var invertX = -1 if mouse_invert_x else 1 var invertY = -1 if mouse_invert_y else 1 rotate_y( deg_to_rad( -event.relative.x * mouse_sensitivity_x * degrees_per_mouse_dot * invertX ) ) camera_mount.rotate_x( deg_to_rad( - event.relative.y * mouse_sensitivity_y * degrees_per_mouse_dot * invertY ) )
This tutorial was exactly what I'm looking for, thanks for making it. Also, do you have any videos covering that shooter project you showed at the end?
If anyone else had a problem where "Default blend time" was giving weird lag to animations, I fixed it by enabling "animation Looping" in the bottom right of the player when selecting the animation player
Love ur content bro Just one question How do you fit all the animation in one base? I tried a lot but I can't do it (I can download all the animations seperately though) Again,love ur content❤❤❤
This is kind of old, so maybe you've done some of this already and I just couldn't find it, but seeing how you add the hit box to the leg when your kicking would be nice!
Pro tip: when importing models from blender, if you put -col at the end of the name of the models in blender, Godot will automatically add a collider for the model when you import it!
Oh cool I didn't know this. gonna play around with it, thanks for the tip!
@lukky. Can also do -vehicle to make it a vehicle body, and -wheel for the wheels, there's a few others too, also for animations -loop
Is this when I am naming the file when exporting it?
@@echoless3484nop, Its on names objects from inspector scene
@echoless you make a object duplicate it name your last object but add a dash at the end then colony like this yourobjectname-colonly click on the colony hold shift click on the normal object select parent object make sure the normal object is the parent and the colony is the child open up the objects children then click on colonly hold shift then click on the object file, export, collada, selection only put it in your go godots blender file.
Jesus ... i tried for a week to achieve this by trying to merge like 7 different tutorials from different people and different engine versions. This is absolutely perfect. Thank you so much 🥳
Thanks for the tutorial! You can add a springcamera3d to camera-mount, move, and child the camera3d to the springcamera3d, adjust the spring length to match your camera3d, and now you have object collision detection, so the camera3d does not go thru the objects.
Learned something new, thanks!
@voc007: very cool. that was new for me. the name of the node is SpringArm3D in Godot 4.2.2
If you get the error "Can't change loop mode on animation embedded in another scene.", I fixed this from the Animation window with "Animation" -> "Manage Animations..." -> Click the save icon -> "Make Unique"
Works. You helped, at least one, real person.
thank you, this helped
The homie.
Hi. Where did you click to get the "manage animations"? I fiddled around a bit but couldn't find that. I made the mixamo_base a scene, and then edited in that scene, which appears to be working.
hey. More specifically at the top of the animation window, around the middle, hovering the mouse over it and "animation tools" comes up. Clicking on it, manage is between new and duplicate. I'm on 4.1.1 (if that affects anything. It's hard to tell sometimes.) @@owenlloyd2528
@Lukky You stand out from the crowd of UA-camrs providing Godot tutorials because you explain the little things that most simply skip over, so you never know the reasons why things happen. Your tutorials, I dare say, educate those of us learning this game engine, in a way that we can take anything you show, and do what WE want to get done. I consider you among the top tier tutorial creators here. I'm looking forward to more videos from you in the future. Would you happen to post anything anywhere else on social media, such as Twitter? Would you happen to tinker around in Blender as well?
Thank you so much for the kind words 😊.
Yes I'll post all my socials on me channel soon. ( Twitter is lukky_nl ). And yes I do use blender alot most of my games start as blender mockups actually :)
10:00 when adjusting the camera you can press ctrl+2 to divide the viewport in 2, so you have the camera preview opened
then switch back with ctrl+1
very useful!
Thanks for the tutorial! Simple and easy to follow.
If anyone is having trouble with the camera controller around the 23:00 minute mark, where there character stops looking in the direction your camera is facing while moving. It may be because instead of visuals.look_at(position + direction) should actually be visuals.look_at(global_position + direction). For me the position command was outputting an increasing value no matter where I walked rather then referencing the global position. You can reverse engineer this issue by using the print_debug(position) line which then will print the variable on the screen when running the game. Good luck guys! also great video man!
Thanks! My player was walking slanted like some jive turkey.
Thanks, fixed my issue.
for some reason my character look to the reverse position when i go foward he look to back wtf
im still trying to fix this issue, and I've already tried this, but are there any other solutions?
@@jonas_epic_gamer make sure to put your "visuals.look_at.." line inside the larger scope of the "if direction..", not the "if animation_player.." !
more please, seriously how did you crunch my last 6 hours or so into the first five minutes x.x I wish I found you first!
I wanted to learn how to set this all up on a controller while going through the tutorial, and god, was it a nightmare. However, I am proud that I figured it out.
This 100% isn't the best way to do this but it's what I figured out and works if anyone else is interested. (make sure to add your right stick inputs to the controller map for lookleft/right/up/down.) This goes after the camera movement part and before the jump action part.
func _process(delta):
rotate_y(deg_to_rad(Input.get_action_raw_strength("lookleft")*controllersense_horizontal))
rotate_y(deg_to_rad(-Input.get_action_raw_strength("lookright")*controllersense_horizontal))
visuals.rotate_y(deg_to_rad(-Input.get_action_raw_strength("lookleft")*controllersense_horizontal))
visuals.rotate_y(deg_to_rad(Input.get_action_raw_strength("lookright")*controllersense_horizontal))
camera_mount.rotate_x(deg_to_rad(Input.get_action_raw_strength("lookup")*controllersense_vertical))
camera_mount.rotate_x(deg_to_rad(-Input.get_action_raw_strength("lookdown")*controllersense_vertical))
I know there is a better way using "Input.get_vector()" but I couldn't figure out how to do it so this is what my brain made.
I love your intro - "Hey, it's Lukky" Thanks for the lessons
Great tutorial! One addition that people might find useful is clamping the camera angle i.e. setting a max / min angle so you can't make the camera go upside down. At 16:00 add the following in line 20 (under the camera_mount.rotation.x):
camera_mount.rotation.x = clamp(camera_mount.rotation.x, deg_to_rad(-90), deg_to_rad(45))
(If you want you can set variables for CLAMP_MAX (-90) and CLAMP_MIN (45) and tweak them til you get what you want.)
Thanks! This is very helpful!
perfect!
i love you
very cool, thank you :)
Definitely one of my favourite Godot UA-camrs out there! Always excellent quality
A tutorial that empowers and has motivated me learn more.
The biggest complement, thanks you🙏
I've watched a lot of videos recently trying to find a more updated tutorial mainly for changes in newer versions of Godot scripting etc, but have always found you to be the best at getting someone started!
This was really helpful to get a good base to experiment with. Easy to follow, some potential pitfalls were explained well. Great tutorial!
Awesome! Super helpful and easy to understand; thank you!
In the physics process, when checking if the kick button was just pressed, I'd add "and is_on_floor()" to prevent kicking mid-air.
Funny, I let it kick mid air for a jumping kick and had to allow move_and_slide so that gravity could take over. Then I slowed it down as it hit the floor again.
Hello, I am a friend in China, I am a newcomer to Godit, and I love Godot
Your videos are great too! Godot is also popular in China! Especially after 4.0, every one of your videos is great and special! Hope to continue to produce great videos!
For all those who want visuals.look_at(position + direction) ore smoother, put this variable under the extends CharacterBody3D:
const SMOOTH_SPEED = 10.0
Also below var direction := (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized() this other variable:
var visual_dir = Vector3(input_dir.x, 0, input_dir.y).normalized()
And finally instead of visuals.look_at(position + direction) this:
visuals.rotation.y = lerp_angle(visuals.rotation.y, atan2(-visual_dir.x, -visual_dir.z), delta * SMOOTH_SPEED)
You are amazing!
thank you man i would have spent forever
Dude this is holy bible. I couldn't explain how much this problem has plagued me. Thank you soo much. But can you explain what does visual_dir does?
@@connorjade5460 Looks like visual_dir stores our input data (w,a,s,d) into a Vector3 var.
Which we use in the lerp_angle() function to tell visuals.rotation.y where to lerp to.
@@Seleneium7 Okay I actually wrote the code which controls the player. That's why this line is not doing anything in my scene.
So easy! Most tutorials use the AnimationNodeStateMachinePlayback or make their own multi state machine. Just set Default Blend Time and play the animation! THANKS
Thanks for the tutorial. I have a problem with the character getting tilted when I start moving at like 45 degrees. It happened after I wrote "visuals.look_at(position + direction)".
Edit: I found this in the comment section "visuals.rotation.y = lerp_angle(visuals.rotation.y,position.angle_to(position+direction),delta*rotation_speed)" wich is an alternative to the first line of code allowing for smooth rotation, it also fixed my initial problem. If anyone has the same problem use this instead, just declare a new "var rotation_speed = 10" at the top and it worked fine.
Visual position xyz 0 in inspector window
Man the background is such a vibee!
great getting started tutorial!
im so happy i found ur channel, u actually go through theses things in such nice detail, and i also love the slower tone of the videos. Thank u so much
@Lukky thank you so much! This helped me a lot! I love the way you are explaining everything in detail.
Thank you! This video moved me forward in my gamedev progress more than any of the tutorials I have watched on YT or paid for at other sources. Since I am an old man just entering gamedev at retirement (Dark Souls inspired gamer, sadly only discovering this art when Elden Ring was released), I have been trying to learn a lot of skills from drawing to coding, music, to modeling - so fun! I have not coded anything since my Fortran and Cobol days, (Pacal, C, Basic, etc...) and I sure wish there was a reference book for gdscript as opposed to the online documents, but my brain is finally starting to rewire for art and coding, despite my preferred learning method of books. With this little 3d controller tutorial I have been able to craft my real-world farm into godot with an adequate animated character model of myself. I decided that modeling my farm and working the farm with a 3d character would be a great way to learn gamedev fundamentals before venturing further. Oh, like a real fool, I modeled the terrain and building in Blender so that I could port them to both Ureal5 and godot to see which I prefer. Doing this made my head spin. I am sticking with godot for now, despite Unreal5 being much easier to set up the base farm and character, but I like coding, challenges and the small package of godot without the ridiculous delays and crashes of Unreal.
Apologies for the long-winded comment but I am feeling more inspired and capable simply because of your excellent tutorial video.
Good luck with your game friend, sounds like you're making great progress so far, gamedev is really hard but it's worth sticking with it. Best wishes
Really appreciate how you go slow and explain your process. 100%
I stumbled across your videos by accident - fantastic! on UA-cam, everyone is yelling and chattering so much in their videos. Starting to watch your videos at first I experienced an unusual sensation in my ears - as if I suddenly teleporting from a loud, noisy metropolis to the mountains, to calming nature. Your videos are just some educational ASMR. And most importantly, useful knowledge as a result. Please keep going 🙏! It's great. Huge respect for your work, man! Thank you.
Great tutorial~! Only issue I've had is that the player character doesn't stop moving even when kicking, but other than that it works great~!
for those who don't know how to move all locally created mixamo animations just use the model and skeleton from one of those nodes and in the animation player nodes of the other scenes just copy and paste it to the animation player node of your preference (it has to be only one) entering manage animations there you paste it by touching the portfolios, if it doesn't even let you copy it you have to save the scene with (ctrl+s) there it lets you do that, I'll let you know don't know much because I spent a whole day looking for how to do that and in the end I discovered it
para los que no sepan cómo se mueve todas las animaciones de mixamo creadas localmente solo tienen que usar el modelo y el esqueleto de uno de esos nodos y en los nodos de animation player de las demás escenas solo tienen que copiarlo y pegarlo al nodo animation player de su preferencia (tiene que ser uno solo) entrando en manage animations ahí lo pegan tocando en el portafolios, si no les deja ni copiarlo tienen que guardar la escena con (ctrl+s) ahí les deja hacer eso, les aviso a los que no sepan mucho porque estuve un día entero buscando como hacer eso y al final lo descubrí yo
I spent 2 days trying to figure this one out and stumbled upon this afterI finally fixed it.
This is exactly what I wanted to learn and you are very easy to understand and follow. Thank you!
for a smoother character turn, instead of using look_at delete that and use this instead
visuals.rotation.y = lerp_angle(visuals.rotation.y, atan2(direction.x, direction.z), delta * 8.0)
Thx you very much, not only i have learned how to set up 3rd person camera ( which was point of watching this video at first ) but also how to add animations , running and transitions.👍
I'm back to this tutorial for like the 5th time. Every time I start a new project, I come back ❤
so you never learn anithing
I learn something new each time. By revisiting the math, composition, and each time with an updated understanding of the “why” from my progress outside the tutorial, I get better. And if nothing else, Lukky is ASMR. You’re just being an ass.
How do you not have more subs? This is the best simple no nonsense tutorial i've seen that's actually useful.
Simple, and great
thanks for this tutorial and please keep post more about godot 3d!
Greta video. Thanks a lot. I'm gonna need this for remaking my unity game into Godot. Thanks! Didn't know Godot was SO MUCH SIMPLER than unity. Your explanation was on point. Thanks a lot!
*If you don't want the visuals to snap to the directions, add these two lines of code instead of the tutorial code:*
In _INPUT() add: visuals.rotate_y(deg_to_rad(event.relative.x*PUTSENSITIVITYHERE #
Thanks a lot, I was mucking around with Asin and Atan2 for an hour earlier trying to get that done.
No problem, me too tbh 0_0@@TheLastPhoen1x
your a life saver
no problem@@dareokoski8158
Thank you; had to change to atan2(-input_dir.x, -input_dir.y) for some reason.
by far the best Godot tutorial out there, by far!!
This video was amazing 🤩🤩
Thank you :)
This is gold man, much appreciated!
thank you and may the gods of he outer world spare you soul and welcome you as a disciple
Thanks for the guide, very well made. Please keep it up!
This video was very informative.
I'd love more exploration on melee combat for third person. I'd love to build something akin to Fable/Kingdom of Almar/etc. ARPG basically, but not sure how to approach things like skill-set moves that do more than swing a sword. Such as teleportation, speed-dashes, dodge rolls.
Any continuation on this tutorial for action combat would be super useful.
Thanks for the tutorials.
@Lukky, wow! This is one of the best tutorials I have found, especially related to Godot. Looking forward to the next ones! Anything related to 3d games is great :D *It would be awesome to see how you set up the jumping animation with this style. It can be quite confusing to new people how to add extra animations with different requirements.
Very good tutorial!
Dont forget guys: if the complexity of the character grows, try to implement a proper design pattern like state machine! Anyway, is an excellent starting point! Thx Lukky
love the vid, thanks for the lesson!
Could give you a quick optimizing and code cleaning tip
for the walk/run segment I found it better to make a dictionnary and a flag variable to handle the entire process (I made it a walk run toggle but if you make the flag true only when shift is held down, the result is the same). This could be a good way to teach how to use dictionnaries
#Replace the speed values with whatever fits better for you
const MOVEMENTS = [
{ "animation": "walking", "speed": 1.725 },
{ "animation": "running", "speed": 3.0 }
]
var toggleRun = false
in the physics process:
#you can change the if with your hold key version
if Input.is_action_just_pressed("toggleRun"):
toggleRun = !toggleRun
...
if direction:
if animation_player.current_animation != MOVEMENTS[int(toggleRun)]["animation"]:
animation_player.play(MOVEMENTS[int(toggleRun)]["animation"])
visuals.look_at(position + direction)
velocity.x = direction.x * MOVEMENTS[int(toggleRun)]["speed"]
velocity.z = direction.z * MOVEMENTS[int(toggleRun)]["speed"]
else:
if animation_player.current_animation != "idle":
animation_player.play("idle")
velocity.x = move_toward(velocity.x, 0, MOVEMENTS[int(toggleRun)]["speed"])
velocity.z = move_toward(velocity.z, 0, MOVEMENTS[int(toggleRun)]["speed"])
Thanks a lot!!! you helped me a lot with mixing animations!!!
What a great tutorial ! Love it.
this is what I was looking for .. big thanks :)
God Bless you for teaching GODOT brother!
great tutorial thank you!
Life saver thank you man this helps so much
I really appreciate this. Thank you
There is a jitter/shake when colliding with the boxes. That's because the floor is too wide causing imprecision in the physics engine. We have to subdivide the floor in smaller pieces or use WordBoundaryShape instead.
A quick fix is to switch the collision shape to a capsule but it will still jitter once in a while.
love your videos, thanks for sharing
thanks for tutorial, awesome like!
Verry good tut and resource thank you buddy!
This is top notch! Thank you!!!
Great video. Keep Up!!
I thuroughjly enjoyed this tutorial :D I would like to see other tips and tricks for setting up 3rd person controls such as removing walking / running animation loop while in jump. but this solves 99% of what most beginners have to setup first. Anyways, keep up the excellent work! will be subscribing RN
phenomenal work!
seen image-line and i subbed
I tell everyone Lukky makes the best & most understandable videos. And this is the fcked independent opinion))
liked and subscribed. Keep up the good work plz.
I like this alot thank you!.
You earned the sub & like mate. Cheers
unintentional ASMR
Great tutorial thanks.
Thank You for this very helpful information I could have died if this video was not made
Amazing tutorial and nice voice :)
Be great to se the FPS and Third controller merged into one tutorial where the player can swiitch the cameras and maybe a FREE camera where they can explore the world up until a certain distance away
This is amazing man, thank you. Do you have any plans to expand this to more advanced 3rd person movement like jumping/climbing/fighting etc?
Oh my god. I found just golden bubble of godot content, i hope godot will become next blender for game industry. Open source rules🤟
I know, late comment, but I'd love to see a tutorial on how to add collision detection (hit/hurt box?) to the kick, so kicking a "target" would knock it back/over, and kicking a wall would maybe knock the player back or interrupt the animation.
The easiest godot 4 tutorial i have seen so far explained everything as it is meant to be thank you so much @Lukky
Thank you. This help me a lot 👍
great tutorial mate!
That damn wallpaper, gets me everytime
@Lukky Thank you so much for this tutorial, it is a great addition to the community's array of learning resources. I have a special request, seeing you're aware of the Gears of War series - would you be willing to do a tutorial in Godot on how to create a Cover System similar to that seen in Gears?
If you kick in the middle of the air you stay floating in the air, and this occurs because the "move_and_slide" also affects the player's gravity.
I fixed this removing the "if !is_locked" from the "move_and_slide()" and adding in the "_physics_process(delta)" this line of code:
if is_locked:
walking_speed = 0.0
running_speed = 0.0
JUMP_VELOCITY = 0.0
else:
walking_speed = 3.0
running_speed = 5.0
JUMP_VELOCITY = 4.5
If anyone knows a better solution please comment.
if not is_on_floor():
velocity += get_gravity() * delta
move_and_slide()
32:05 - To contribute a bit, instead of the if !animation_player.is_playing(): unlocking fix, I did an "await" coroutine on the kick function. It goes....
animation_play("kick")
locked = true
await get_tree().create_timer(1.5).timeout
locked = false
....which, to me, seems a bit more un-glitchable (perhaps debate-ably compared to a dedicated timer and/or state machine but this way fulfills one thing at a time principles).
Holy @$@#$! thanks. This is so helpful. Please continue making these tutorials, always useful. Maybe you could do one for gamepad controls?
if you want to stop the camera clipping inside things add a springarm3d as a child to the camera_mount node. then add the camera as a child of the springarm3d node. then set a distance on the springarm3d node.
This was awesome
very helpful thank you
Great tutorial!
Pro-tip, for "source engine" sensitivity standards, the number of degrees you turn per mouse dot is 0.022 by default.
There's no agreed standard for this, but this is as close as you're going to get to a standard.
e.g.:
# standard source engine metrics
var degrees_per_mouse_dot = 0.022
@export var mouse_sensitivity_x = 3
@export var mouse_sensitivity_y = 3
@export var mouse_invert_y = false
@export var mouse_invert_x = false
func _input(event):
if( event is InputEventMouseMotion ):
var invertX = -1 if mouse_invert_x else 1
var invertY = -1 if mouse_invert_y else 1
rotate_y( deg_to_rad( -event.relative.x * mouse_sensitivity_x * degrees_per_mouse_dot * invertX ) )
camera_mount.rotate_x( deg_to_rad( - event.relative.y * mouse_sensitivity_y * degrees_per_mouse_dot * invertY ) )
Thanks 👍 100% working
Best tutorial yet
Plz make a shotgun tutorial with the 4.0 stable tutorial you did.
thanks so much dude!!
This tutorial was exactly what I'm looking for, thanks for making it. Also, do you have any videos covering that shooter project you showed at the end?
If anyone else had a problem where "Default blend time" was giving weird lag to animations, I fixed it by enabling "animation Looping" in the bottom right of the player when selecting the animation player
Love ur content bro
Just one question
How do you fit all the animation in one base?
I tried a lot but I can't do it
(I can download all the animations seperately though)
Again,love ur content❤❤❤
melhor tutorial, bom trabalho
Beautiful code. And effective
Awesome, can you show us the 3rd person project you are working on?
This is kind of old, so maybe you've done some of this already and I just couldn't find it, but seeing how you add the hit box to the leg when your kicking would be nice!
22:23 the character keeps looking ar randome-weird angles isntead of toward the direction she is walking-