Just to let you know there's a technical issue with the www version of the website right now, but you should still be able to access it at codewithtom.com. Apologies for the inconvenience and thanks!
Everything works properly except When I press a key Move forward or move backward It only moves a hair.. And it stops moving.. Requiring me to press the key multiple times to get movement is there a line I'm missing.. Or is that normal for the basic third person
If I lift the player in the editor and then run the game, it crashes. If I don't lift it and I run it, I can't move. Furthermore, it says that this node $CameraPivot/CameraBoom/Camera don't exists. I followed the tutorial and copied the github code. What's happening???
Great video! Another way to do the little y velocity trick is to just let gravity handle it. I think the only change you'd need is after the move_and_slide, just say y_velocity = velocity.y. That way, if the move affects the y velocity, your y velocity will also be affected (running off a ramp for example). Then you can just delete the "if is_on_floor()" bit, and just always apply gravity. edit: I believe the reason this happens is because is_on_floor() only reports true if it hit a floor during the last call to move_and_slide()
Dude your tutorials are really easy to follow along. Each bit clearly explained and I don't have to download any assets. Did this and your FPS series to get a jumping off point for my project and I remember how to use and modify each tidbit to fit my needs; a sign of really clear teaching looking forward to future godot tutorials 👍
Thank you so much for the amazing feedback Yuler. I'm really glad you've found the tutorials so useful and it's great to hear that you were able to take them and expand them to fit your needs! Good luck in your game development journey and I hope I can help you with more content as your progress. 👍
Your explanation of each line of code is awesome. I dont understand a line of code but just listening to your explanation as you went through made me feel so much more at ease with the concept and i could understand the gimble problem and your solution to it. Very cool.
I had not seen this video on your channel, you have surprised me, this is too useful, thank you, you are an excellent instructor, I would love if you could teach how to do a logic related to turns, for example in a card game, first is the player's turn, next, the enemy player
hey man just learnt that there is a built in clip camera node that makes it very easy to setup third person camera as it has physics interaction built into it so that the camera automatically comes close to the character rather than going through the wall. just wanted to share it here : )
If I lift the player in the editor and then run the game, it crashes. If I don't lift it and I run it, I can't move. Furthermore, it says that this node $CameraPivot/CameraBoom/Camera don't exists. I followed the tutorial and copied the github code. What's happening???
Hi Voylin's life, I have an improved version of 3rd Person control here that fixes this problem: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-YNmSwR8aSzU.html . Just copy/paste code from description into your script editor. This is due to the momentum from the drop being calculated onto the "slide" of the slope.
EDIT Thanks Tri Dra I rewrote my code. I don't know what I did wrong but it works fine now. This was a great tutorial, it really helps with a lot of the clipping issues you can get with 3d. Hey the tutorial is working out really well especially with the camera not clipping into walls and other things. I have an issue with the movement on my end though. Moving forward and right works well, but not moving left or backwards. I have yet to find too much of a difference between our codes. I'd be obliged if you had any suggestions.
you have written this in back and left right back: if Input.is_action_pressed("ui_down"): direction += transform.basis.z (I am using ui_down as input) left: if Input.is_action_pressed("ui_left"): direction -= transform.basis.x hope this helps
Thanks, but I think I have that part down right. Sometimes with these tutorials I have to look at my code for days until I find what is wrong. If you want I can post my code down here. The only difference is that I added a key to regain mouse control.
Awesome tutorial! Was looking forward to see a better explanation on how to use the spring arm properly. Do you have any plans for a tutorial on aiming with camera rotation? It's been kinda hard to find materials on this matter. Either way, keep it up with this series, it rocks 😄
Hi Vinny, thanks for the feedback! Yeah I'm currently working on a third person game so I'll be bringing a lot of my learnings from it into future video tutorials.
great tutorial, i hope you will also do one on third person animations with a state machine and blendspaces, i can fairly easily get to this point of a controller with a basic capsule but when i try and implement my character model with his locomotion animations then it all goes pear shaped XD
Rotation_degrees is no longer implemented in Godot 4, going to need fixes for that x.x linear_interpolate also seems to no longer work in Godot 4 Also gravity is extreme in Godot 4, like bagillions of times its supposed to
i have followed this to the t up to 15min mark when i got to test it i just get a grey screen it does give me errors like node not found CameraPivot and the CameraPivot/CameraBoom/Camera. so its like i have no camera at all idk where i messed this up
This tutorial is great. It works. But one small questions. I'm absolutely not into programming, how to make character not move where camera look? I mean, to make camera move around character, but character stands still and change direction only when moving. I don't really know if I said it clear, English is not my native.))
i'm having an issue where when i play my game after the player collision section, i can't move my camera angle up more than just a little bit, but i can move my camera 360 degrees, help?
Hi, when the player is on the floor we apply a small amount of downward force to keep the player locked to the floor and ensure that the KinematicBody is_on_floor method reports correctly. As I mention in the video, there may be better ways to do this but I found this method to work best. 😁
It did not work i got an error message: invalid get index 'rotation_degrees'(on base:"null instance) i checked to see if i did something wrog but it was just like in the tutorial someone explain pls....
@@ceasnov I gave up awhile ago so hard I gave up on making games, now I'm trying once again. But I actually found my bug, I was trying to get the camera pivot node from higher up in the scene tree, apparently Godot doesn't like that very much (my script was in the camera itself, because I felt like making other stuff with the camera separate from the Player node), when I transferred the code to the Player node, it worked! (In a messed up way, but at least now I have different bugs to fix)
I really like your style. Quick, but explaining everything that's needed for what you want to achieve. I found your post on the godot forums about rendering huge, far away objects. You said you might do a video on this, are you still planning to do this?
Thank you! Good question, that's been asked a couple times before. I definitely plan to do it at some point, it's on a long list of topics I'd like to get covered :)
hi is there a way to control amount of time player will be in sky when he jumps if not i would like to know as for this video the number of seconds player stays in air so that i cam make animation accordingly
line 30 camera_pivot.rotation_degrees.x -= event.relative.y * mouse_sensitivity ,for some reason it isn't working and is causing it so I can't tryout the code in debug can you help me out? also its saying line 17 and 18 have errors
I was looking in your GDScript file and I love it, it works perfect for my project. Thanks a lot. But I'm suffering a few to map my keyboard keys to move the character inside the scenario. Serching in your GDScript file, the code is maped to player move and looking in the Godot Project Settings I couldn't set the specific keys for that. How can I do it? And again, nice videos. You are having a lot of workd to do with these videos and your 'job' to show the comunit how to code and work with Godot is great. Please continue always.
what if I want to rotate the camera seperately but when I press the move forward key it changes to the camera rotation, like a mmo style camera, how would I do that?
The onready keyword defers initialization until the _ready function has been called. It's essentially the same as initializing a variable inside _ready.
I used your camera set-up for a project it works except for the fact that when I face the camera to its max height(90) or minimum (-90) the player starts flying when he is moving....he can even move on walls like it's the floor. It's really bugging me.i figured out that it is caused by the springarm when I used another camera set-up.but I dunno how to fix it
Well idk y but i copied the mouse movement part of the code and and used it its working and i checked if i did smt wrong but it was the same thing so yea it must be a buy sry for the disturbance
"Parser Error: too few arguments for "clamp()" call. Expected at least 3." This is referencing your last line of the script. Any idea what may be causing it? The debug window also comes up but, it's just blank. I'm using Godot 3.2.2
Hi Lautaro MMB, This is because the vector movement goes down in a stair-step motion with slopes. It gets off the floor and pushed back down to the floor. I have a video that fixes this problem, along with a couple others: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-YNmSwR8aSzU.html . Just copy/paste code from description into your script editor.
I need help(not relating to the video: Why when I use get_node() it only works on some scripts and not others, I literally COPY AND PASTED a working get node code that I wrote and it just couldn’t find the node, even though it found the node from the previous code? Why does godot only sometimes work??
When the player moves under the second platform and the camera is in a higher position, or when the camera is behind the wall and the player slide in front of the wall, then the camera didn't move smooth to the player. Can you solve this with raycasts and update it?
Hi James, you could indeed roll your own spring arm solution using a raycast node and then lerp the desired position to get a smoother transition. You would experience issues with the camera going "through" geometry as it smooths into position though.
Hi Dude, I doesn't know how to Code in games, Because I'm Commerce background. So please suggest me how to learn Coding (Free Ebooks, or Tutorials link), suggest me good one please.