these are great tutorials! going through them all has given me ideas for a 3D platformer that I actually want to commit to and create once the series is done :D
cant wait for next part, i love how you remind us to take all the good habits like saving after a change to the code or adding the description in the script
Thank you for these, they've been a great help so far in just finding out how to get started with anything and figuring out all the ways in which you have to really think about how you code. I used Game Maker 5 and 8 many years ago, some form of RPG Maker as well, and have been working on projects in both GMStudio 2 and RPGMMV as well as GameboyStudio, much more recently. None of them have been as complicated to start out as this program it seems, understandably so with the shift to 3D for me I think, but it doesn't help I tend to rely on a lot of drag-and-drop kind of simple programming rather than actually learning how code goes together. So you really breaking this stuff down into the hows and whys and making sure to repeat processes has been very informative and makes everything feel much more manageable. I've seen some other comments on previous videos about feeling like they're back in junior high and annoyed with it, but even at 32 myself I really appreciate the way in which you don't just assume anyone who's watching is already familiar with this or that jargon. Hope to see more from you soon and will likely rewatch some of these as I go.
This series has been amazing, a great introduction to 3D in Godot, so a huge thanks! I am unfortunatley running in to a little issue I haven't seen mentioned here, every lesson up to here works great except once adding the xform.basis = xform.basis.orthonormalized() it flipped my character from left to right, character moves in the right directions, it's just the mesh flipping on the y axis. Not sure why and would apprecieate if anyone has any knowledge on this, thanks! No rush of course, I'm moving on to the next lessons in the meantime.
Fantastic series so far, thank you so much! Could you please make a whole video just about transforms and how to think of them and how they work? I feel the whole internet would be eternally grateful :D
YES, new video, im actually using this tutorials for a fighting game, so anyone who wants to do something different can still use all the information provided, Thanks for all this BornCG
If the character is on a ramp, then jumps while not holding any of the movement keys upon landing, the character will still be angled normally on the ramp. A workaround for this is to change the if is_on_floor()... statement to "if (is_on_floor() and input_dir != Vector2(0,0)) or is_on_floor_only():". the "or is_on_floor_only()" part adjusts the character's angle if they JUST touched the floor, but not after. Hope this helps! Last comment I promise :P
Just started this series and been amazing so far. Can't wait for the rest to come out. I wanted to add to what others said and kind of compile it into one comment to fix the ramp issue. You need to set RayCast3D node to top level just like the camera controller node is. Then set the raycase3d position to player position and alter the if statement to add or is_on_floor_only which looks like this in the code: # Rotate the character to align with the floor $RayCast3D.position = position if is_on_floor() and input_dir != Vector2(0,0) or is_on_floor_only(): align_with_floor($RayCast3D.get_collision_normal()) global_transform = global_transform.interpolate_with(xform, 0.3) elif not is_on_floor(): align_with_floor(Vector3.UP) global_transform = global_transform.interpolate_with(xform, 0.3)
I love your videos they are useful and helpful and I managed to fix all the problems I had with your code on 4.3 but also I'm not being rude but the videos seem to be coming out quite slowly as it has been 11months and only 13 videos have came out but anyway I appreciate the help and effort!
Here is a solution for the edge issue: make the node RayCast3D "Top Level" and assign player's position to its position in function _physics_process. It prevents changes of the RayCast3D's rotation in world space. Also it can protect the player from an overturn, which makes the RayCast3D no longer detect the ground. This series is one of the best Godot 3D turorials!
I'm wondering if you used a timer for the orientation where it waits like, a quarter of a second or less to update, as that jittering seems to happen really rapidly... or would it only result in slower shaking? I'm curious as to what is causing the shaking if you're not moving? Why would it change when you are still? There has to be a reason. Maybe you should move a little farther each time, but maybe slower so the speed seems the same so it doesn't make such minute movements to cause that?
Just wanted to say I'm an educator teaching my third game class for the littles and I was stressing trying to find something more thought-out than Flowlab for my course. All my kids wanted 3D development and I struggled getting Unity to work on our Mac machines so I decided to go with Godot. What an amazing series! I hope you can get most of these uploaded by next year because I am going through all of these for reference! Do you have PDF lessons on each activity? Thanks --Coffee
Thanks for your comment! No I don’t have the lessons / content in written format, sorry. The good news: my videos should accelerate a little come September, hopefully.
@@BornCGcan you please upload a beginner friendly UA-cam tutorial video. That teach you how to code and develop games using GD script. by illustrating step by step, how to code and make multiple games from different types and genres, by GD script and Godot. I will really appreciate it if you did this please.
Well, I kinda skipped the part on the camera following the character and just attached it to my player, but now changing the global transform also messes up the camera. Back to video #9 I go 😄 Edit: I'm back. Now I'm having some new issues. 😆 I'll get there in time. Even the great masters of old stumbled through their early years! I had this wobble back and forth on my bottom ramp because I put another block underneath it and it was swapping back and forth. I shortened the ray cast to -0.1 and it fixed that for me. But then I also had weird issues like my character shrinking and dropping through the map and so on.
when i just walk on the floor, my block is doing crazy stuff like rotating because of the block extrude i did.. how to fix that without having to completely modify the map
As a beginner this was absolutely super helpful and well made, sadly found out like halfway through that it won't work for rigidbody based characters. Which should have been obvious in hindsight 🤦
One issue I encountered is if you transition from one ramp angle to another on a corner ramp, they'll still keep the original angle and look slanted. Did anyone else encounter this? Any tips for fixes/workarounds?
Depends what you want to use blender for. If you want to render Pixar level animations with hundreds or thousands of frames, you’ll need to upgrade cone render time realistically. If you’re doing simpler work or just learning, you can go a long way with a basic laptop.
I have an issue where when I add the Xform my character no longer falls to the ground, it stays in the air in the same place and I still have full control of the camera and the character's orientation but it does not move. does anyone know why this might happen, when I delete it all it works again. I have followed the entire series so I haven't changed anything and I'm on Godot 4.3 if that's an issue.
My player object falls through the floor and I can't really figure out how to fix it, but it does stay on the floor if I take away the global_transform = xform so I don't really know what to do.
bro in my top_ramp model collision is wierd. I cannot walk up on it without lower ramp and the character stumbles upon it. I did blender just like in your video. Remaking the model did not solve the issue.
For some reason my character doesn't align with the normals. Instead it just goes flat and falls through the floor. I'm using your code exactly. I'm getting thousands of errors saying '"det==0" is true'. I don't know what's wrong on my end. Here is my code. It's before the smoothing. I figured there isn't any reason to continue on with the smoothing if my character doesn't do the thing in the first place lol var xform : Transform3D #Rotate character to align with floor if is_on_floor(): align_with_floor($RayCast3D.get_collision_normal()) global_transform = xform func align_with_floor(floor_normal): xform = global_transform xform.basis.y = floor_normal xform.basis.x = -xform.basis.z.cross(floor_normal) xform.basis = xform.basis.orthonormalized()
@@BornCGcan you please upload a beginner friendly UA-cam tutorial video. That teach you how to code and develop games using GD script. by illustrating step by step, how to code and make multiple games from different types and genres, by GD script and Godot. I will really appreciate it if you did this please.
A quick Google suggests that error is caused by something equalling 0 that shouldn't be. If by "flat", you mean your character is appearing 2D-ish, that might indicate the affected axis. I would try adding `print(floor_normal)` to check the floor normal looks correct, then `print(xform.basis)` before the orthonormalized line to make sure you don't have a bunch of zeroes. It's then worth checking that your objects are set up exactly as per the video. Good luck!
@@devdanielplays...7519 The affected axis is y. The floor normals for flat surfaces are (0,1,0) as they should be. The The xform.basis before orthonormallized is [X: (0, 0, 0), Y: (0, 0, 0), Z: (0, 0, 1)] The Y should be (1,1,1), right? I don't know why the Z has a 1 when I'm on flat ground.
I have corner ramps in my level and if the character stops on a corner like you did at the top of the ramp the character's direction gets shifted out of alignment where it is moving forward while facing about 10 or 20 degrees off of the direction it is moving. 🥴
You know it's a good day when BornCG uploads!
my thoughts exactly
True
You are a true educator. These are some of the best, most thorough and well-explained tutorials I have seen for game development.
these are great tutorials! going through them all has given me ideas for a 3D platformer that I actually want to commit to and create once the series is done :D
cant wait for next part, i love how you remind us to take all the good habits like saving after a change to the code or adding the description in the script
Thank you for these, they've been a great help so far in just finding out how to get started with anything and figuring out all the ways in which you have to really think about how you code. I used Game Maker 5 and 8 many years ago, some form of RPG Maker as well, and have been working on projects in both GMStudio 2 and RPGMMV as well as GameboyStudio, much more recently. None of them have been as complicated to start out as this program it seems, understandably so with the shift to 3D for me I think, but it doesn't help I tend to rely on a lot of drag-and-drop kind of simple programming rather than actually learning how code goes together. So you really breaking this stuff down into the hows and whys and making sure to repeat processes has been very informative and makes everything feel much more manageable. I've seen some other comments on previous videos about feeling like they're back in junior high and annoyed with it, but even at 32 myself I really appreciate the way in which you don't just assume anyone who's watching is already familiar with this or that jargon. Hope to see more from you soon and will likely rewatch some of these as I go.
This series has been amazing, a great introduction to 3D in Godot, so a huge thanks! I am unfortunatley running in to a little issue I haven't seen mentioned here, every lesson up to here works great except once adding the xform.basis = xform.basis.orthonormalized() it flipped my character from left to right, character moves in the right directions, it's just the mesh flipping on the y axis. Not sure why and would apprecieate if anyone has any knowledge on this, thanks! No rush of course, I'm moving on to the next lessons in the meantime.
Me to
please continue with this very instructive videos sir
Happy birthday and thank you for the upload!
Great tutorial, thank you very much for making and sharing this lesson.
Fantastic series so far, thank you so much! Could you please make a whole video just about transforms and how to think of them and how they work? I feel the whole internet would be eternally grateful :D
YES, new video, im actually using this tutorials for a fighting game, so anyone who wants to do something different can still use all the information provided, Thanks for all this BornCG
If the character is on a ramp, then jumps while not holding any of the movement keys upon landing, the character will still be angled normally on the ramp. A workaround for this is to change the if is_on_floor()... statement to "if (is_on_floor() and input_dir != Vector2(0,0)) or is_on_floor_only():". the "or is_on_floor_only()" part adjusts the character's angle if they JUST touched the floor, but not after. Hope this helps!
Last comment I promise :P
When I implemented this, the transition tremors came back
Just started this series and been amazing so far. Can't wait for the rest to come out. I wanted to add to what others said and kind of compile it into one comment to fix the ramp issue. You need to set RayCast3D node to top level just like the camera controller node is. Then set the raycase3d position to player position and alter the if statement to add or is_on_floor_only which looks like this in the code:
# Rotate the character to align with the floor
$RayCast3D.position = position
if is_on_floor() and input_dir != Vector2(0,0) or is_on_floor_only():
align_with_floor($RayCast3D.get_collision_normal())
global_transform = global_transform.interpolate_with(xform, 0.3)
elif not is_on_floor():
align_with_floor(Vector3.UP)
global_transform = global_transform.interpolate_with(xform, 0.3)
This seems to have fixed the issue, hopefully it can be pinned
Thank you very much
I love your videos they are useful and helpful and I managed to fix all the problems I had with your code on 4.3 but also I'm not being rude but the videos seem to be coming out quite slowly as it has been 11months and only 13 videos have came out but anyway I appreciate the help and effort!
nice :)
Here is a solution for the edge issue: make the node RayCast3D "Top Level" and assign player's position to its position in function _physics_process. It prevents changes of the RayCast3D's rotation in world space. Also it can protect the player from an overturn, which makes the RayCast3D no longer detect the ground.
This series is one of the best Godot 3D turorials!
Worked perfectly! Smart solution :D thank you
Commenting to help boost this answer, worked for me too
Very tidy solution, thanks :)
Thank you very much for the video.
I think the raycast is not necessary. In the CharacterBody3D node there is the get_floor_normal() method.
I'm wondering if you used a timer for the orientation where it waits like, a quarter of a second or less to update, as that jittering seems to happen really rapidly... or would it only result in slower shaking? I'm curious as to what is causing the shaking if you're not moving? Why would it change when you are still? There has to be a reason. Maybe you should move a little farther each time, but maybe slower so the speed seems the same so it doesn't make such minute movements to cause that?
Happy birthday Sir you are awsome
Thank you so much
can you make video on character design and walking please
Just wanted to say I'm an educator teaching my third game class for the littles and I was stressing trying to find something more thought-out than Flowlab for my course. All my kids wanted 3D development and I struggled getting Unity to work on our Mac machines so I decided to go with Godot. What an amazing series! I hope you can get most of these uploaded by next year because I am going through all of these for reference! Do you have PDF lessons on each activity? Thanks --Coffee
Thanks for your comment! No I don’t have the lessons / content in written format, sorry. The good news: my videos should accelerate a little come September, hopefully.
@@BornCGcan you please upload a beginner friendly UA-cam tutorial video. That teach you how to code and develop games using GD script. by illustrating step by step, how to code and make multiple games from different types and genres, by GD script and Godot. I will really appreciate it if you did this please.
@@BornCG no problem, thank you for the videos! I'll see if I can convert them into a PDF format for future lessons.
Well, I kinda skipped the part on the camera following the character and just attached it to my player, but now changing the global transform also messes up the camera. Back to video #9 I go 😄
Edit: I'm back. Now I'm having some new issues. 😆 I'll get there in time. Even the great masters of old stumbled through their early years!
I had this wobble back and forth on my bottom ramp because I put another block underneath it and it was swapping back and forth. I shortened the ray cast to -0.1 and it fixed that for me. But then I also had weird issues like my character shrinking and dropping through the map and so on.
Thank you for the tutorial but for some reason my character turned giant after implementing this code.
Is there anyway to change him back?
Hate to bother you, but is there a way to do this purely visually? Like, only apply the rotation to an animated rig?
when i just walk on the floor, my block is doing crazy stuff like rotating because of the block extrude i did.. how to fix that without having to completely modify the map
As a beginner this was absolutely super helpful and well made, sadly found out like halfway through that it won't work for rigidbody based characters. Which should have been obvious in hindsight 🤦
👍
One issue I encountered is if you transition from one ramp angle to another on a corner ramp, they'll still keep the original angle and look slanted. Did anyone else encounter this? Any tips for fixes/workarounds?
Happens to me too :/
I've been following this series. It'd be awesome to be able to join a discord community if you have one
Hello BornCG, I want to ask you. My laptop has not external graphics card eg,gtx and rtx. Without gpu, can I use Blender for long term?
Depends what you want to use blender for. If you want to render Pixar level animations with hundreds or thousands of frames, you’ll need to upgrade cone render time realistically. If you’re doing simpler work or just learning, you can go a long way with a basic laptop.
@@BornCG thanks
I have an issue where when I add the Xform my character no longer falls to the ground, it stays in the air in the same place and I still have full control of the camera and the character's orientation but it does not move. does anyone know why this might happen, when I delete it all it works again. I have followed the entire series so I haven't changed anything and I'm on Godot 4.3 if that's an issue.
Thanks once again. Can you please upload the important parts of this series as soon as possible? I would like to enter BRACKEYS game jam.
My player object falls through the floor and I can't really figure out how to fix it, but it does stay on the floor if I take away the global_transform = xform so I don't really know what to do.
I fixed it!!!! If anybody else has the same issue it's because the code on line forty for him has to be double tabbed
bro in my top_ramp model collision is wierd. I cannot walk up on it without lower ramp and the character stumbles upon it. I did blender just like in your video. Remaking the model did not solve the issue.
Align_with_floor ()
Is not working . Please help me to resolve the problem.
My character go straight down to the floor
Helo mr BornCG, can you tell me how to make all this asset/ or is there asset can I download it ?
theres a guide for asset making in part #10 and #11 of this series
@@andreaang9448 thanks
For some reason my character doesn't align with the normals. Instead it just goes flat and falls through the floor. I'm using your code exactly. I'm getting thousands of errors saying '"det==0" is true'. I don't know what's wrong on my end. Here is my code. It's before the smoothing. I figured there isn't any reason to continue on with the smoothing if my character doesn't do the thing in the first place lol
var xform : Transform3D
#Rotate character to align with floor
if is_on_floor():
align_with_floor($RayCast3D.get_collision_normal())
global_transform = xform
func align_with_floor(floor_normal):
xform = global_transform
xform.basis.y = floor_normal
xform.basis.x = -xform.basis.z.cross(floor_normal)
xform.basis = xform.basis.orthonormalized()
Is your call to align with floor indented correctly?
@@BornCG The comment might show it a little wonky but yes, in my editor, everything is indented correctly.
@@BornCGcan you please upload a beginner friendly UA-cam tutorial video. That teach you how to code and develop games using GD script. by illustrating step by step, how to code and make multiple games from different types and genres, by GD script and Godot. I will really appreciate it if you did this please.
A quick Google suggests that error is caused by something equalling 0 that shouldn't be.
If by "flat", you mean your character is appearing 2D-ish, that might indicate the affected axis.
I would try adding `print(floor_normal)` to check the floor normal looks correct, then `print(xform.basis)` before the orthonormalized line to make sure you don't have a bunch of zeroes.
It's then worth checking that your objects are set up exactly as per the video.
Good luck!
@@devdanielplays...7519 The affected axis is y. The floor normals for flat surfaces are (0,1,0) as they should be. The The xform.basis before orthonormallized is
[X: (0, 0, 0), Y: (0, 0, 0), Z: (0, 0, 1)]
The Y should be (1,1,1), right? I don't know why the Z has a 1 when I'm on flat ground.
I have corner ramps in my level and if the character stops on a corner like you did at the top of the ramp the character's direction gets shifted out of alignment where it is moving forward while facing about 10 or 20 degrees off of the direction it is moving. 🥴