@@sheepcommander_ I do apologize but I am still having trouble figuring out what to do to simplify this code. If someone could provide a little more detail I'd be so grateful! I am not finding the lines mentioned and no matter what I try to change it just bugs out.
@marcosmachado6844 Жыл бұрын
For people around still Simplified code with just 7 lines of code: func player_movement(input, delta): if input: velocity = velocity.move_toward(input * SPEED , delta * ACCELERATION) else: velocity = velocity.move_toward(Vector2(0,0), delta * FRICTION) func _physics_process(delta): var input = Input.get_vector("ui_left","ui_right","ui_up","ui_down") player_movement(input, delta) move_and_slide()
@jiboodie534411 ай бұрын
it says speed not declared
@marcosmachado684411 ай бұрын
@@jiboodie5344 add the following lines after extends CharacterBody2D: @export var SPEED = 100 @export var ACCELERATION = 200 the @export keyword allows you to change these values on the editor itself
@mukakatae374311 ай бұрын
Add a speed variable to your character @@jiboodie5344
@ISAIAH_E_E11 ай бұрын
Correct me if I'm wrong but if you're running your movement functions inside _physics_process shouldn't you go ahead and get rid of delta in move_towards?
@marcosmachado684411 ай бұрын
Its because you are running it inside the physics process that you do want to have the delta there. Physics process is called every frame and delta is the time passed between the last frame and the current frame. If your computer is running at let's say 60 FPS, your delta value would be usually something like 0.01667, but if it was running at 120 it would be something like 0.083334. If you dont actually put delta there, the player would be moving at the top speed, every frame, and instead of having that smooth movement the player would move extremely faster than it should. Putting delta there guarantees that the player will have that smooth movement and that it will work as intended, no matter the FPS your machine is running at.
@dajoma36 Жыл бұрын
Thank you for another great video. You have a knack for explaining things that is easy to follow and understand. I am looking forward to more of your videos on Godot 4.0. I really like that you explain what is different in Godot 4 from Godot 3 and I can't wait to see what you cover next. You be safe, and have a great day.
@dev-worm Жыл бұрын
Glad it was helpful! Looking to make many more godot 4 tutorials, and if you need anything let me know!
@davekudrev4849 Жыл бұрын
Thank you so much! I been looking ages for a guide to set up a character body movement identical to rigid body. This is going to be a great foundation to play around with. You made my Monday evening a blissful one. :)
@willbrods Жыл бұрын
Thank you so much I cant tell you as someone who has just got into coding how much this has helped with my players movement your way of explaining things is amazing and I left and sub and like and about to go watch more of your vids! Keep up the good work!!
@dev-worm Жыл бұрын
thanks bro, looking to upload many more tutorials on all godot topics
@covereye573111 ай бұрын
Really useful for creating slippery ice floor movement. I was setting new velocities instead of adding and substracting to it, which gave me a lot of issues on the slip behaviour when turning directions
@BiffleDiffle-1Ай бұрын
this is peak of usefulness for people like me who are more interested in the level and visual design than the coding of it all! if yo dont mind, im gonna use this code with a couple modifications to the starting constants this earned a like for how digestable it is too
@BiffleDiffle-1Ай бұрын
now that i think about it, its sub worthy, i look forward to future totorials on game code like this
@dev-wormАй бұрын
aw thank you so much!! that means the world, and of course feel free to use it whenever! If you ever have any questions I am here for you!
@schuepbachr3 ай бұрын
Happy to have found you- getting started on my first project ever, and tutorials like this are so freakin' helpful.
@marketwoodfarm4 ай бұрын
Thanks for this, the below, does the same, just shorter. extends CharacterBody2D const max_speed = 400 const accel = 1500 func _physics_process(delta): # Update velocity towards the desired direction based on input velocity = velocity.move_toward(Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down") * max_speed, accel * delta) # Move the character move_and_slide()
@dev-worm4 ай бұрын
nicely done!
@yt159-sj6hdАй бұрын
hippity hoppity all your code is now my proprety! seriously thanks guys ive been new to godot for a month now.
@Ratankumar-rs9ptАй бұрын
Thanks I copy and I was my paste on my Godot 4.0
@completelyrandomlyhandlee6 ай бұрын
EVERYTIME i start a game (super noob, still a hobby), i try to reinvent the wheel with controls. THIS is how to do it.. the other ways can feel different/fun, BUT the bugs it presents are endless down the line. Stick with this, make it feel how you want by modifying it, but if you are day one new..... just do this, it IS correct. Thats why for the 5th time ive tried to vary movement, i have found my way back to tutorials to debug. if i can offer any advice to other new people, just do this!
@coenraadgreyling40007 ай бұрын
For anyone who wants to use animations with their sprite and is struggling, I added a few lines of code based off of dev worm's other video to help: Declare at top: var current_direction = Vector2.ZERO var current_animation = "" Add to existing code: func _physics_process(delta): player_movement(delta) play_direction_anim(delta) func play_direction_anim(delta): var anim = $AnimatedSprite2D var new_animation = "" if input.x != 0 or input.y != 0: current_direction = input if current_direction.x > 0 and velocity.length() > 0: new_animation = "walk_right" elif current_direction.x < 0 and velocity.length() > 0: new_animation = "walk_left" elif current_direction.y > 0 and velocity.length() > 0: new_animation = "walk_down" elif current_direction.y < 0 and velocity.length() > 0: new_animation = "walk_up" else: if current_animation.ends_with("_right") and velocity.length() == 0: new_animation = "idle_right" elif current_animation.ends_with("_left") and velocity.length() == 0: new_animation = "idle_left" elif current_animation.ends_with("_down") and velocity.length() == 0: new_animation = "idle_down" elif current_animation.ends_with("_up") and velocity.length() == 0: new_animation = "idle_up" if new_animation != current_animation: anim.play(new_animation) current_animation = new_animation
@зовименяпапикс3 ай бұрын
this freed my soul
@TheDawnprojekt3 ай бұрын
you can also set animatedSprite2D to be a unique name so you call it with % ?
@udtsans11382 ай бұрын
Do I have to add this to the bottom or top of the existing code?
@iPlay1337Ай бұрын
bro idk what you do for a living but like you need to do this. the way you explain this is so well that even i could understand it (only been coding for liek 2 weeks). so thank you
@arukon3111 Жыл бұрын
Stumbled upon this when looking for something else, but damn, it helped me a lot. i was worried about scaleability with my previous approach on player movement but your code eliminated that fear and got me excited to build on it. Thanks a bunch for the great video!
@dev-worm Жыл бұрын
so happy to hear that!
@blackjacked_xiii7 ай бұрын
I appreciate you taking the time to explain what your code means.
@dev-worm7 ай бұрын
happy to hear!! hope it helped! thank you!
@Tmaster2006YT5 ай бұрын
Thank you. This is the first coding tutorial I’ve followed that gave me a tangible result.
@dev-worm5 ай бұрын
so glad it was able out!
@cuppixd4267 Жыл бұрын
Was hoping for vids with godot 4, love it thx
@dev-worm Жыл бұрын
many more godot 4 tutorials coming really soon!
@productionsinparadise288010 ай бұрын
When I tried it. I could only move a certain amount before permanently decelerating. I would have to hit the arrow keys again to keep moving (and go even faster). It's cool, but it doesn't look like what you did in the video (or at least I don't think it does).
@HagDeLioncourt3 ай бұрын
hi! starting to learn godot, your vids are very helpful! hope you can make a part 2 video with the sprite animations added to this code!
@TheEx404 Жыл бұрын
Thanks, great tutorial. ❤
@dev-worm Жыл бұрын
Glad it was helpful!
@kinghalls130711 ай бұрын
Thank you soo much for the tutorial... Super easy to follow! I was following your other tutorial as well "how to create an rpg in godot" and I'm not sure on how to add the animations to this movement? If you could help I'd really appreciate it!
@MateHall Жыл бұрын
your so good at explaining this stuff thanks !
@enterthearcade Жыл бұрын
I was able to use this and tweak it just a little bit, but man, this is really super smooth movement. Thanks for this!
@dev-worm Жыл бұрын
So glad to hear that!!
@Intergalacticprismaticcreature9 ай бұрын
im porting my scratch game to godot and this is gonna help so much!
@bubbathesomewhatreal5 ай бұрын
Good luck!
@kingshahzad785 ай бұрын
I appreciate your logic and struggle but It flew over my brain
@lordbmc3656 Жыл бұрын
i did every thing he did and i cant make the player move and i dont have any errors popping up what could i have done wrong
@JustTaaco Жыл бұрын
I'm looking very much towards tutorials on shaders for godot 4, and just more godot 4.0 tutorials in general :))
@dev-worm Жыл бұрын
Going to be uploading like every other day for godot 4 tutorials
@IronModeOfficial Жыл бұрын
Yes man glad your back. Let’s get this goin Btw my game is almost done just need to work my inventory
@dev-worm Жыл бұрын
inventory is pretty complex but im working on a video right now for the inventory system and it should be very helpful for you.
@IronModeOfficial Жыл бұрын
@@dev-worm I Appreciate it
@Kxloedit Жыл бұрын
Cant describe the smile on my face after it worket thanks
@dev-worm Жыл бұрын
so glad i could help :)
@BusterDM9 ай бұрын
this was very well explained and easy to understand for a beginner
@dev-worm9 ай бұрын
so happy to hear! thanks!
@Alejandro-x1i2 ай бұрын
wow man i love this code logic. thank u
@dev-worm2 ай бұрын
thank you so much! I am so happy to hear that it was helpful!
@dwried7 ай бұрын
I'm actually glad this script is broken down this way. Working on something like a top down flight game. It gave me insight on how I want to go about it now. I have to take into account airspeed and drift. Many thanks. My movement script was going to be an utter mess. Lol.
@dev-worm7 ай бұрын
so happy it was able to help!! goodluck on your game!! keep me updated on it.. Im curious now!
@Miiite Жыл бұрын
Your video si already very clear, but what might make it clearer is adding a few comments along the way. Basically when you define the if clause to handle the acceleration and the deceleration, adding a simple comment above the if and else to say "# handle acceleration" and "# handle deceleration" would help clarify things. But that's just a bonus, the video is pretty clear as it is already, thanks !
@sockretett Жыл бұрын
Thanks for tutorial!
@maciold87815 ай бұрын
Thank you, it's a great tutorial!
@dev-worm5 ай бұрын
so happy to hear that!! thank you!!
@D-Samurai9 ай бұрын
very easy to understand thank you!!
@dev-worm9 ай бұрын
so glad to hear!! thank you! happy it helped!
@pancake_776 Жыл бұрын
Super nice tutorial! Thanks!
@dev-worm Жыл бұрын
of course anytime!
@Yinithyn Жыл бұрын
You have this video on smoother movement, and it works! but you also have a video on animation in the other RPG series, how do i combine the two? i want this guys movement and the characters animation.
@Tillionz Жыл бұрын
Thank you so much for this tutorial excellent descriptions and great code!!!
@DyIanGaming11 ай бұрын
Is it easy to animate the player with an animated sprite 2d and this type of movement?
@shattre608710 ай бұрын
yes
@williampoole42974 ай бұрын
Hey Bro. Love the video. I entered in the code just like you said however the input.x and input.y lines my int(Input doesn’t look right. On your code, int is red and Input is green. But both int and Input are green. What did I do wrong? I loaded my world and by dude didn’t move at all.
@0CutieCat0 Жыл бұрын
Tutorial about Minimap with objective locations and such 👉👈
@Now_Roxas Жыл бұрын
Thanks this is really helpful.
@TheTheMrbob9 ай бұрын
Hey can you do a video how to do the wasd button pls bc i think thats better combos and i dont under stand how to do it thanks for an answear or a video
@dev-worm9 ай бұрын
Go to Project Setting > Input Map Tab > Type in "right" in the "Add New Action" Section. Then next to the "right" action click the + and then whatever key you want to be associated to "right" so "d"... then in code instead of saying "ui_right" just put the name of your action so for this instance put "right"...... hope that helps!!
@TheTheMrbob9 ай бұрын
@@dev-worm thanks it works thank you
@websdevgio9 ай бұрын
i love your video it my first time in godot and was awesome
@dev-worm9 ай бұрын
thank you so much! happy to hear that!! if you ever need anything else then please let me know!! I am more than happy to help!
@Lansamatv Жыл бұрын
you can make tutorials for a donw top shooter game
@Rotado5 ай бұрын
Thank you so much :D
@dev-worm5 ай бұрын
thank you!! glad it helped!!
@Lukydnomo Жыл бұрын
hey bro, how would you put in code a way to change sprites or animations etc? like, for example, putting a walking animation when the character walks and such, I wrote the code and I didn't find a way to implement this "mechanic" of changing sprites and such, if you can answer me I'd appreciate it, thanks, great video
@Gameaholick Жыл бұрын
you want to declare the animations as a variable you can call so for me " @onready var _animated_sprite = $AnimatedSprite2D " then in your if function you call it to be played here is an example " if Input.is_action_pressed("right"): " and to idle you assign the idle like this " elif Input.is_action_just_released("right"):" you then repeat this for all your directions _animated_sprite.play("walkRight") _animated_sprite.play("idleRight")
@t_t_tomas Жыл бұрын
the "velocity" variable at 11:00 is not declared anywhere, what am I missing?
@t_t_tomas Жыл бұрын
I found the error, I updated to 4.0 and its fixed
@bloodc0re_ Жыл бұрын
Thank you very much
@dev-worm Жыл бұрын
of course anytime.
@SS.StarlightStudios2 ай бұрын
Thank you!
@dev-worm2 ай бұрын
thank you!! Im glad it helped!
@bobojenkins580511 ай бұрын
is there a resource that goes over all of the built in functions? No matter how good you get at coding you cant be a mind reader and know whats in all of these functions to use them. And wtf is delta?
@lphipps1986 Жыл бұрын
my debugger goes off the charts when i try to move. i coded everything as you did and it all checked out. but when i try to play the character doesnt move
@ignaciodangelo6385 Жыл бұрын
Great video , i have a question , velocity = velocity.limit_length(max_speed) here velocity is a Vector2d but max_speed is an integer . Why does this works and what is Godot interpreting ?
@jorijndg Жыл бұрын
It's not limiting X and Y separately, but limiting the length of the vector. It's the equivalent of normalizing the vector (dividing by its length), then multiplying by the limit value, effectively setting the length to the limit value. It only does this when the length is greater than the limit value, otherwise the vector doesn't change.
@Soulcode-k2 ай бұрын
I made one game a pretty good one at that but I always forget the code, but I know the logic so each time I manage. But the remembering the exact code feels impossible specially when I keep learning new things. Is that ok?
@BadBedroomBeatProducer10 ай бұрын
I get the error "invalid call. nonexistent function 'is_action_pressed' in base 'Vector2'."
@NimmDir8 ай бұрын
Have the same issue - do you found a solution?
@BadBedroomBeatProducer8 ай бұрын
Nope
@chymty66034 ай бұрын
same issue
@chymty66034 ай бұрын
ı found the problem well this comment was from 6 months ago but you probably wrote input instead of Input
@Agent_0088 ай бұрын
Thank you so much!!!!!
@dev-worm8 ай бұрын
of course! anytime! thank you!
@Hawaiian.AoiTodo_80811 ай бұрын
It irritates the absolute frick out of me when I perfectly attempt to recreate what a turorial show. No wrong code at all. Line for line, word for word, letter for letter. Absolutely perfect. And it just doesn't work for whatever reason godot decided to just not work.
@michealarchangel6373 ай бұрын
Yup mine says it expects an initializer after constant name and refuses to work without it. What this initializer is fk if i know.
@buttialmahairbi2854 Жыл бұрын
hey devworm can you make a video on a platformer movement please man ❤
@daemonphil95317 ай бұрын
Hi, i tried to do it and my Godot is saying : Invalid call. Nonexistent function 'is_action_pressed' in base 'Vector2'... and i don't understand what to do now...
@TFAmbience6 ай бұрын
You need to make sure you have the text exactly as shown on screen. If anything is capitalized or lower cased in the wrong spot, the function won't work
@daemonphil95316 ай бұрын
@@TFAmbience
@Kumo0 Жыл бұрын
Can u pls make a vid about how to make a smooth jump in Godot 4
@graso-ln8nb5 ай бұрын
I doubt u'll see this, but just in case, ive been looking for a way to make the player sprite smooth, not the movement, but where's the sprite looking at, i cant find anything so this is like a last resort, thank u in advance (sorry for bad english)
@driescoppens834 Жыл бұрын
do you have any idea how to make sure the player can't leave the erea
@alexsanderrain2980 Жыл бұрын
This is pretty neat
@manusgraham1159 Жыл бұрын
I tried using this code but for 3d and it works for the most part, but it seem as soon as you stop pressing an input the physics stop working, life you hold left and then let go it stops dead, but once you press a different input like down for example then it steers into it like you were holding left the entire time, it's like the game is paused when you stop pressing inputs, anyone know why that is, any help is appreciated thank you
@dev-worm Жыл бұрын
Ooo im sorry i have no idea, have never played with 3d but if you check godots discord im sure someone would love to help
@mykaru3553 Жыл бұрын
For me I ran into the same issue, but I was able to fix it by setting "friction" to a very small number. Granted, I had to set my max speed to a super small number as well (0.05), but setting my friction to around this number solved the issue for me
@visibletoallusersonyoutube592811 ай бұрын
Happened to me too and I'm in 2d
@EepEep-d8w10 күн бұрын
could you help with an error i cant fix? extends CharacterBody2D var friction = 60 func _physics_process(delta): move(delta) var input = Vector2.ZERO func getinput(): input.x = int(Input.is_action_pressed("moveright")) - int(Input.is_action_pressed("moveleft")) input.y = int(Input.is_action_pressed("movedown")) - int(Input.is_action_pressed("moveup")) return input.normalized func move(delta): input = getinput() if input == (Vector2.ZERO): # this line has an error if velocity.length() > (friction * delta): velocity -= velocity.normalized() * (friction * delta) else: velocity = Vector2.ZERO else: velocity += (input * 10 * delta) velocity = velocity.limit_length(20) move_and_slide() this is the code i made with this tutorial, but its giving an error on line 15 because of invalid operands. do you know what the issue is?
@dev-worm8 күн бұрын
I see! you put "input = getinput()" instead of "input = get_input()". You are missing that underscore in between get and input. and since getinput() isn't a valid operand but a made up one you are receiving that error. I hope that helps!
@EepEep-d8w8 күн бұрын
@@dev-worm thanks
@pytho290911 ай бұрын
thanks for the tutorial, I learnt a lot but when I try to run the program I get the error: invalid operands 'Callable' and 'Vector2' I've double checked the code and don't think anything is wrong but it won't work, this error has been brought up in a previous comment as well, could someone please help?
@lv99redchocobo6 ай бұрын
did i miss something? when did you define velocity? I don't see it here. how come this isn't throwing an error?
@dev-worm6 ай бұрын
you no longer have to define velocity on a characterbody2d in godot 4 like you did have to do in godot 3!!
@dylanwillyams Жыл бұрын
im having trouble getting this and animations to work at the same time. any tips?
@dev-worm Жыл бұрын
check out a series on the channel like the "How to Create a Survival Series in Godot 4" or the "How to Make an RPG in Godot 4" Series.. in both of those I go over this pretty good!
@dylanwillyams Жыл бұрын
@@dev-worm yeah i was trying to follow along on the rpg series. but you cant add the dir = "right" and so on in the same line as the input.x= . Basically i cant figure out how to map out the direction mapping to correspond to activating animations.
@bigdaddystrokes Жыл бұрын
@@dylanwillyams Interesting. I'm currently wondering how I can get my character in the RPG tutorial to move a little more freely in all directions as right now its stuck on the "up,left,down,right" directions only and it feels pretty stiff. I'm currently following the smooth movement tutorial, but its hard to wrap my head around how I will update the "RPG" tutorial movement lol!
@Valori_4 Жыл бұрын
how to use a variable twice in one script ? plz telll me i need to know
@sanitarysanchez Жыл бұрын
i'm getting an error message (Invalid operands 'callable' and 'Vector2' in operator '==')
@pytho290911 ай бұрын
same here, i'm not sure what to do about it, did you manage to fix it in the end?
@gatocalcio10 ай бұрын
@@pytho2909 pls share code for check
@peshkatfathi6661 Жыл бұрын
Thanks🤘
@SilverLightDungeon Жыл бұрын
Look, I have this little amount of projects (maybe 3948), and I am always very anxious about the final product, and I forget that despite knowing programming, I have no idea what I am doing in a gaming creation engine. So I just threw away my pride (in a tin of pink trash) and I'm learning from zero all the basic mechanics of how to create a character. Thank you so much for helping me to create my perfect game, if I even complete a demo of the game I bring the link to those interested in knowing the project.
@dev-worm Жыл бұрын
hey, glad i could help. I am really interested in knowing about the project btw
@marang_quntana7350 Жыл бұрын
Yess Godot 4.0 Les gooo
@dev-worm Жыл бұрын
Godot 4 is so good
@Violet_fykshyn3 ай бұрын
getting annoyed at all these videos that will just not explain the what or why of anything. I've watched multiple tutorials on this and each one has used a different method and not a single one has explained it. Saying what you type as you type it doesn't actually explain anything just an fyi
@foxxtronix655611 күн бұрын
watch coco code he does it perfectly and he gives you chances to do it on your own when you do somethinf more then once
@Khalid_Looby10 ай бұрын
i am watching at 1080p and using upscale and i still cant see text clearly. is that I or i small? not clear.
@dev-worm10 ай бұрын
really?? I'm looking back and it is visible clearly to me... is it still like that for you?
@Khalid_Looby10 ай бұрын
Yep. it is not real 1080p video. like the res is 1080 but i am sure the bitrate is not that of an actual 1080p video. I have seen 720p videos clearler than this. but it is fine. Thanks so much for your tutoiral. :)@@dev-worm
@OfficialGoldenLeaf Жыл бұрын
How would i go about movement without diagonals?
@TrueSaLegend6 ай бұрын
hey I have a problem my charakter is not moving up or down. When I press the up or down arrow I move for 1 or 2 pixels.
@dev-worm6 ай бұрын
make sure you don’t have if input.is_action_just_pressed. because if you have the “just” pressed it only calls it once instead of calling it the entire time the button is pressed down
@Col4688 ай бұрын
hold alt to resize both sides a once
@dev-worm8 ай бұрын
thanks, good tip!
@Mr.Kef_art Жыл бұрын
I'm getting an error when I press play. It says: "Invalid Call. Non existent function "is_action_pressed" in base "Vector2". Tried to fix it but I don't know what to do.
@dylanwillis345710 ай бұрын
I had the same thing happen, I just had to capitalize the i in Intput.is_action_pressed
@guilhermepimenta81196 ай бұрын
I have a very niche problem and I can't figure it out alone In the game that im making my character can spin and move with key presses I got to a point where I have this video's movement and the rotation working (pressing f to rotate to the left and g to rotate to the right) but if iI hold both rotating buttons at the same time i can only move up for some reason . Can somebody help me with this?
@guilhermepimenta81196 ай бұрын
edit: It was a hardware issue :]
@ZachGamesOFFICIAL6 ай бұрын
sorry for commenting a whole year later, but i have a problem that needs to be fixed, i can't collide with anything, i tried using the move_and collide script, but it didn't work, how would i make it work?
@dev-worm6 ай бұрын
do you have a collisionshape2d within the scene? you will still beable to collide with the environment even with move and slide as long as all the objects including the player have a enabled collisionshape2d!! hope this can help! if not let me know!
@duck761 Жыл бұрын
can you explain me how pressing a button changes the input and why does this "input = Input.get_vector("move_left", "move_right", "move_up", "move_down")" fuocking work
@Amazing_Software Жыл бұрын
The "move_left" etc. are part of Godot's built in input mapping. If you open Project Settings, then Input Map, then check "Show Built-in Actions" and you can see a bunch more too. These are such standard events, that Godot bakes them in. You can define your own stuff too, or remove the built ins.
@pakancina3138 Жыл бұрын
what programing languige was used here?
@camy-linghoangminh7166 Жыл бұрын
gdscript
@Ronic-gray4 ай бұрын
Instructions unclear ending up getting 15+ errors I'm being serious
@dev-worm4 ай бұрын
actually?? which errors?
@Ronic-gray4 ай бұрын
@dev-worm ok. I deleted the original code to work with something else, but there were like 18 errors, mostly just expecting a certain character or an unexpected character around line 18 and one error on line 12 about an uneven unindent. I'm new to coding so I probably just messed up somewhere but I have no idea what I did wrong.
@ddrruwu5 ай бұрын
I'm pretty sure I'm using the same code but i keep getting "Invalid call. nonexistent function 'is_action_pressed' in base 'Vector 2'" any suggestions?
@dev-worm5 ай бұрын
what input is within the is_action_pressed()... did you make sure to create that as a input in the input map within the project settings?
@Platinumcan5 ай бұрын
@@dev-worm Yeah hey, I do have the same error code showing, it shows me that its in the line 13. I did check the input map, and it looks to be right(I can be wrong) ui_up has up and the same the others. trying to find out why myself, but still no luck. I have only tried making the character movement so far in this project, and the code looks exact like the video show`s.
@voilano6816 Жыл бұрын
This whole code is without delta time, I know that move_and_slide function adds delta but only to the parameters inside right? So what are the places to put the delta if anyone konws?
@icecoldmagic5 ай бұрын
is saying that my velocity is undefined and wont let me add a velocity function, variable or constant
@dev-worm5 ай бұрын
are you in godot 4?? because that seems like an error you’d get in godot 3 before the velocity was a thing. Hoping that helps you a bit
@icecoldmagic5 ай бұрын
@dev-worm no I'm in 4 100%
@SethRuh7 ай бұрын
it keeps telling me it cant find limit_length on base Vector2?
@agusnutt9 ай бұрын
Can somebody help me I need to put an animation of walking diagonally to my character, but I don't know how to put the code I want the animation to occur when pressing 2 keys
@dev-worm9 ай бұрын
I went over this in the first episode of the survival series!! and I think it is exactly what you are looking for!! I hope it helps! kzbin.info/www/bejne/m3KolpJvn6iJatU
@davebot_30 Жыл бұрын
where was the bit where you bind the keys
@dev-worm Жыл бұрын
in the setting and then under the "input map" tab!
@davebot_30 Жыл бұрын
Thanks
@ivaneban21218 ай бұрын
Can some one help me pls... i did everything as in the video but i can movie neither with WASD , mouse, with the arrows
@dev-worm8 ай бұрын
did you use "ui_up", "ui_down", etc? If so that should be the arrows and if you want WASD then you have to go into the Project settings > input map - and create new input actions. for example "right" and assign that to the "d" key. Then in the code use "if is_action_pressed("right"):"
@999dunkins Жыл бұрын
this is way too smooth, how do you make your character stop immediately when not moving
@999dunkins Жыл бұрын
Oh you had to do something with friction, okay
@successspotu Жыл бұрын
Godot 3.5 if i create button i can also use and access by mobile game or app touch input but godot 4 i create button and export to android i can't use or access that button why any fix available please tell me
@dev-worm Жыл бұрын
I’m not sure I’ll look into it because many thing have been changed
@successspotu Жыл бұрын
@@dev-worm yes
@successspotu Жыл бұрын
@@dev-worm you wil find please make a video
@RafinCG10 ай бұрын
BEST BRO
@Hatsenc Жыл бұрын
Mine just crashes when I try to run the scene
@kompetenzboxАй бұрын
“go dot” 💀 Jokes aside thx for the tutorial
@dev-wormАй бұрын
guh-dough!! I have learned!! of course anytime, I hope it helped! if you ever have any questions feel free to let me know!
@randomsounds2167 Жыл бұрын
Smooth
@Simon-xi7lb Жыл бұрын
14:50 "we can go to our world and play" bruh but HOW?? WHAT? what button did you press wtf?!
@dev-worm Жыл бұрын
the play button at the very top of the screen or F6
@Simon-xi7lb Жыл бұрын
@@dev-worm thanks bro!
@hardmave Жыл бұрын
I need to spam it before i move and i move really slowly
@dev-worm Жыл бұрын
its because you might be useing if Input.is_action_just_pressed(xxxxx) instead of the one im using inside of this tutorial