loving this series so far. you teach very well. when we got to the "var input_dir = Input.get_vector("left","right","up","down")" part, and you left out normalized i figured you were going to go back and add it later, so i added it beforehand. come to find out, you added it on another line. im pretty sure you already know that you can do this, but i added it on the same line like this var input_dir = Input.get_vector("left","right","up","down").normalized() this is just the way ive always done it when having the movement like this. either way is great tho. thanks again
@JameishLestray
8 ай бұрын
Finally!!! Thanks Russ! Can't wait for part 3!! Please do make a platformer tutorial like Coco code did!! You two are the best at explaining and are my favorite teachers!!
@Snyper-if3kt
5 ай бұрын
So with the input_dir variable it doesn't actually need to be normalized. Part of the Input.getvector function is that it does do that for you. I saw this as strange and so I checked the numbers (not just with the eye test). And the velocity was indeed normalized be itself. For added thought though I add the normalized function onto input_dir and low and behold, the result came back the same so its not hurting anything if its there, its just not needed.🙂
@CodingWithRuss
5 ай бұрын
Ah that's handy to know! Thanks for checking it 🙂
@ivanyosifov2629
8 ай бұрын
9:11 - I'm confused. We use position variable that we didn't declare previously. Same with velocity.
@CodingWithRuss
8 ай бұрын
These variables are part of the CharacterBody2D Node already. When the script is created, the first line is "extends CharacterBody2D" and what this means is that the script can use all the functions and variables that are part of that Node. That includes the position and velocity variables. Hope that helps!
@ivanyosifov2629
8 ай бұрын
Yes, thank you. That explained enough to understand what's going on
@Lansamatv
8 ай бұрын
You are truly the best, you don't know how much I love you. ❤
@JustAChannel11631
8 ай бұрын
Love your channel. 2 questions if I may: 1) Why you picked Godot for it? 2) What do you think the best language/engine to make light 2d games?
@keznoAU
4 ай бұрын
godot is best for small and large 2d games unity good for 2d games and smaller 3d games unreal good for large 3d games
@kamsiosuachalla
8 ай бұрын
Love your videos, very informative
@rolodagger4386
7 ай бұрын
Viewport rect size function doesn't work for me, it doesn't start my scene from point 0,0 so i can't get near the east and northern gaps. Any idea what's wrong?
@kamsiosuachalla
8 ай бұрын
I was the First to like🎉🎉🎉
@kriftik1945
8 ай бұрын
Keep it up!🤩
@rezashir3873
8 ай бұрын
very good😍
@Lansamatv
8 ай бұрын
Please make it survival io style, like this a rougelike
@arbozaliyan
6 ай бұрын
var mouse_position= get_local_mouse_position() var angle = rad_to_deg(atan2(mouse_position.x , mouse_position.y)) if angle > -22.5 and angle < 22.5: $AnimatedSprite2D.play("walk_D") elif angle > 22.5 and angle < 67.5: $AnimatedSprite2D.play("walk_DR") elif angle > -67.5 and angle < -22.5: $AnimatedSprite2D.play("walk_DL") elif angle < -157.5 or angle > 157.5: $AnimatedSprite2D.play("walk_U") elif angle > 112.5 and angle < 157.5: $AnimatedSprite2D.play("walk_UR") elif angle > -157.5 and angle < -112.5: $AnimatedSprite2D.play("walk_UL") elif angle < 112.5 and angle > 67.5: $AnimatedSprite2D.play("walk_R") elif angle > -112.5 and angle < -67.5: $AnimatedSprite2D.play("walk_L") if velocity.length() == 0: $AnimatedSprite2D.stop() $AnimatedSprite2D.frame= 1 This is what i did
Пікірлер: 17