I know how many comments have already said the same thing but this was shockingly concise and well made. You perfectly quickly explain everything so well. You've earned my subscription sir.
I have a whole lot of concept art for a 2d top down game and these tutorials really helped, there is a lot of stuff I’m still trying to figure out like how I’m going to animate my sprites and a lot more, but I saved some of your tutorials to a playlist I will watch them all on repeat until I can understand it well
im making a small indie game with 2 of my friends and i have NEVER touched unity in my life and this tutorial helped me figure out movement enough to get the basics of the game
0:58 Small tip: if you make simple 2d top down game and don't need gravity or physics that much, you should change rigidbody2d -> body type from Dynamic (default) to Kinematic instead. So you don't have to worry about forgot set this thing up or something made up. Good luck on your journey!
@@koolkiller35 You can refer here in 1:28 and 2:09 ua-cam.com/video/xp37Hz1t1Q8/v-deo.html Also you have to know that in unity when you build something in your scene event you build in 2D world basicly it's still happen in 3D that why you can switch it's properly and you can check in RigidBody2D -> Constraints -> Freeze rotation Z which is height value of 2D object in 3D world to prevent it's had strange behavior when interacting and have behavior of 3D world like floating around.
Had to rewatch on .75 and .5 speed and pause, but this is not a video about copying your code, simple explanations, right to the point, even just enough of extra info about some codeline, keep it up and thank you for your help
You, good sir, are a freaking LIFE SAVER. I was looking everywhere for a simple tutorial on this, and by God, you made it stupidly easy. Thanks to you I overcame a simple, yet seemingly insurmountable obstacle. THANK YOU! :)
Nice video. Amazing how you can get full movement for top down in a 7 minute video. A lot of other tutorials drag on for like half an hour to achieve the same outcome. This is one of my 5* tutorials, which I keep in a folder for future reference.
anyone who got stuck on the scripting bit. like me. i was missing the extensions in visual studio code. you just need the c# one but you'll also need .net framework 7 and the 4.7.1 devpack ( forgot full name) once i got those i had all the needed links after that it was a breeze. also at end my character wouldn't move and i had all the spelling and so on correct in the code the issue was super simple. i had to capitalise the H and V in horizontal and vertical. drove me mad but wanted to share because this video works but my road was bumpy cause those factors. liked and subbed mate spot on thank you
More than a year old but this still holds up! Only nitpick is I wish you'd linger on your code for a second or two after you've finished typing rather than just zipping back over to Unity, gives me a chance to pause so I can fully read what you've done.
hi i am russian and i don’t even know if i am writing correctly because through a translator. i didn’t think i would switch to english courses but i switched thanks to you
I was stuck using AddForce from a different tutorial, and I couldn't for the life of me figure out, or find the syntax for other movement types. Not only that, even had I found Velocity, the way it is implemented is different than the AddForce was... so I would've been lost regardless! Now, we have a very straightforward, and easy to understand multidirectional movement!
FYI you can just put * speed in the process input float and put rb.velocity = moveDirection in void move and it will work just as fine as rb.velocity = new Vector2 (movedirection.x, movedirection.y)
I have been trying to learn basic top down movement like this for the past couple days. I have no C# experience, but this is the only video where the code actually worked and I learned what it meant. Will definitely watch more videos, thanks!
i literally love you. Thx for this, pls keep making short videos like this. For example make a one tutorial about how to make 2d map work properly, making game interface etc.
Simple Easy to follow along To the point with out any unnecessary assets or utility files to import. As someone who's just gotten into the gamedev, Thank you! I've been trying to learn basic concepts and techniques and I keep hitting walls because a lot of "beginner" tutorials will skip explaining/showing 1 or 2 really basic code that is essential to making a script work, or have assets preloaded and then never reference them in the tutorial. I've had to stop (after much frustration and time invested) a number of them and then look for how to do X, just to move forward. So a big thank you for keeping it short and sweet w/out any other unnecessary dependencies.
Do you have your VS Code editor formatting method blocks in K&R style as you type or are those subtle jump cuts? I'm going crazy trying to get VSCode C# to stop doing Java style curly braces. Even the Unity snippet extension I'm using formats it that way, but the auto formatter fixes it when I hit the hotkey. I just want the lightweight-ness of Code with the feeling of Studio typing ahhh
Wow thank you so much, i found it hard to follow on in other peoples videos but you did a really good job at explaining the code and how it is used, so thanks a lot!!!
Great video, I was stuck for hours before. what interpreter are you using? I think mine is basic c#, and I even downloaded Unity for Visual Studio Code.
@@alexanderschmid6251 If you can't make use of this video to make such easy mouvements maybe it's time to rethink your programming skills and creativity just saying... This video is perfect since he uses physics and the inputs are perfectly managed (I'm not insulting btw it's just what I think)
Really nice video, explained everything really well and very clear. I'm still a beginner for unity and my first real project is making the Atari game from the film Ready Player One and this video was an absolute godsend.
your tutorials are really short doable and amazing its better than brackeys brackeys just acts like everyone knows what everything is and does so its not really great for beginners like me so thank you b mo also i love how you reply interact and help people example- (you helped me on discord with the typo errors and the main menu so i appreciate you BMo
If you're wondering how to limit diagonal movement speed using the new linearVelocity property, don't normalize the movement vector. Instead, add this line of code after defining moveDirection: if (moveDirection.magnitude > 1) moveDirection = moveDirection.normalized;
Hey, great tutorial. Im relatively new to unity and I just wanted to make the simplist top down game in the universe but I can't get my movement script to work. Please help
@@BMoDev hey im kinda new to this stuff.. i have "using System.Numerics; in my script and i think its somehow blocking my private Vector 2. Why that? can u explain it to me? EDIT: The problem was that i had [using System.Numerics; and using UnityEngine;] And it somehow didnt know which directory to use.
whenever i open VSCode on unity and try puttting something like GameObject nothing comes up, and its not the intelli thing cos other tthings come up like try and stuff does anyone know why
For ma bois Here's the script: using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerMovement : MonoBehaviour { //Public Variables public float moveSpeed; public Rigidbody2D rb; //Private Variables private Vector2 moveDirection; void Update() {
ProcessedInputs();
} void FixedUpdate() { Move(); } void ProcessedInputs() { float moveX = Input.GetAxisRaw("Horizontal"); float moveY = Input.GetAxisRaw("Vertical"); moveDirection = new Vector2(moveX, moveY); } void Move() { rb.velocity = new Vector2(moveDirection.x * moveSpeed, moveDirection.y * moveSpeed); } } P.S. There is no error.(and dont copy this thing in your script lmao)
BRO I love you instead of just showing the code you also explain it even though it's 3 years old this is one of the few tutorials I respect
Simple, straight to the point and only 7 minutes long. Love it.
That's what she said.
I know how many comments have already said the same thing but this was shockingly concise and well made. You perfectly quickly explain everything so well. You've earned my subscription sir.
People who gives their knowledge for free, r a other kind of hero. U r kinda saving lives if I think deep about it. Gj!
I have a whole lot of concept art for a 2d top down game and these tutorials really helped, there is a lot of stuff I’m still trying to figure out like how I’m going to animate my sprites and a lot more, but I saved some of your tutorials to a playlist I will watch them all on repeat until I can understand it well
im making a small indie game with 2 of my friends and i have NEVER touched unity in my life and this tutorial helped me figure out movement enough to get the basics of the game
I appreciate your speed and conciseness! Other tutorials are finishing up their promotions and introduction at 7:20
*cough* *cough* brakeys *cough* *cough"
@@sofisticated1940 Don't disrespect the legend himself.
kids hating on brackeys
Short, simple, and it works! As an artist trying to learn code, thank you!
0:58 Small tip: if you make simple 2d top down game and don't need gravity or physics that much, you should change rigidbody2d -> body type from Dynamic (default) to Kinematic instead. So you don't have to worry about forgot set this thing up or something made up. Good luck on your journey!
I'm sorry I'm new to coding and don't understand. Can you explain that in a bit more detail?
@@koolkiller35 You can refer here in 1:28 and 2:09 ua-cam.com/video/xp37Hz1t1Q8/v-deo.html
Also you have to know that in unity when you build something in your scene event you build in 2D world basicly it's still happen in 3D that why you can switch it's properly and you can check in RigidBody2D -> Constraints -> Freeze rotation Z which is height value of 2D object in 3D world to prevent it's had strange behavior when interacting and have behavior of 3D world like floating around.
@@koolkiller35in the rigid body where u adjust the gravity, there is an potion called "bodytype" change that from dynamic to kinematic
Good shout honestly
Had to rewatch on .75 and .5 speed and pause, but this is not a video about copying your code, simple explanations, right to the point, even just enough of extra info about some codeline, keep it up and thank you for your help
best tutorial! telling my friends to come here if they want to learn game dev
You, good sir, are a freaking LIFE SAVER. I was looking everywhere for a simple tutorial on this, and by God, you made it stupidly easy. Thanks to you I overcame a simple, yet seemingly insurmountable obstacle. THANK YOU! :)
FINNALY a video that will work! i've lost my hair trying to find a top down movement tutorial
This is perfect for underwater movement. Thank you for this tutorial!
Nice video. Amazing how you can get full movement for top down in a 7 minute video. A lot of other tutorials drag on for like half an hour to achieve the same outcome. This is one of my 5* tutorials, which I keep in a folder for future reference.
anyone who got stuck on the scripting bit. like me. i was missing the extensions in visual studio code. you just need the c# one but you'll also need .net framework 7 and the 4.7.1 devpack ( forgot full name) once i got those i had all the needed links after that it was a breeze. also at end my character wouldn't move and i had all the spelling and so on correct in the code the issue was super simple. i had to capitalise the H and V in horizontal and vertical. drove me mad but wanted to share because this video works but my road was bumpy cause those factors. liked and subbed mate spot on thank you
More than a year old but this still holds up! Only nitpick is I wish you'd linger on your code for a second or two after you've finished typing rather than just zipping back over to Unity, gives me a chance to pause so I can fully read what you've done.
TNice tutorials is THE most helpful tutorial on UA-cam imo. I am starting production in Hardstyle, and I find soft soft really useful
hi i am russian and i don’t even know if i am writing correctly because through a translator. i didn’t think i would switch to english courses but i switched thanks to you
Кстати я тоже русский
I love how straight to the point this is. :)
Thanks! I did this and linked it with the Animator StateMachine- with the Horizontal and Vertical inputs - to make very smooth-looking movements.
Ayy nice work! You're ahead of the game, that was going to be a followup video :)
@@BMoDev That's great to hear! Looking forward to watching the next.
Thanks so much for this tutorial! I'm getting back into game dev after a long break and this tutorial was super helpful to me!!!
Love to hear it, keep going! Feel free to share your progress in the discord would love to see what you make!
same here!
Everything that I needed was here all the time...thanks for sharing your skills.
Great tutorial. If anyone's Vector2 is an issue, delete "using System.Numerics;" if it's in your Visual studio code. That fixed it for me
Thanks for sharing!
im learning game design for a class project and this was helpful. thank you!
It scares me how good theses tutorials are!
Wow appreciate it
Thank you so much for this tutorial. I am currently working on a procedurally generated dungeon game, and this helped me get started. Great video!
Appreciate it! Would love to keep tabs on your game
getting watched latered for the rest of my days thank you
I was stuck using AddForce from a different tutorial, and I couldn't for the life of me figure out, or find the syntax for other movement types. Not only that, even had I found Velocity, the way it is implemented is different than the AddForce was... so I would've been lost regardless! Now, we have a very straightforward, and easy to understand multidirectional movement!
OMFG the best tutorial easy to follow and I learned soooo much KEEP GOING
No doubt, glad it helped!
surprisingly hard to find videos about top down movement and this tutorial was very helpful
I've always thought that too, np
FYI you can just put * speed in the process input float and put rb.velocity = moveDirection in void move and it will work just as fine as rb.velocity = new Vector2 (movedirection.x, movedirection.y)
Went way too fast at times and even cut away like 1 frame before you finished typing a line of code but I was able to make it work.
I can't type I need help
@@Ivy_olive_catswhy are you coding then
Omg, glad you’re ok!
Yeah my problem but I can't make it work
Super easy to follow tutorial!! We STAN Bmo 😎
your comments actually make me laugh everytime
Not really. I'm doing Unity the first time and he is just jumping around. It should be slower for a tutorial.
Thank you, your tutorial is the only one working on all of the videos I searched
Omg this is so much simpler and a better explanation than 3 other videos
I have been trying to learn basic top down movement like this for the past couple days. I have no C# experience, but this is the only video where the code actually worked and I learned what it meant. Will definitely watch more videos, thanks!
Nice job!
LOVE how you explains stuff. so clear!
Short and concise! Thank you!
i literally love you. Thx for this, pls keep making short videos like this. For example make a one tutorial about how to make 2d map work properly, making game interface etc.
Simple
Easy to follow along
To the point with out any unnecessary assets or utility files to import.
As someone who's just gotten into the gamedev, Thank you!
I've been trying to learn basic concepts and techniques and I keep hitting walls because a lot of "beginner" tutorials will skip explaining/showing 1 or 2 really basic code that is essential to making a script work, or have assets preloaded and then never reference them in the tutorial.
I've had to stop (after much frustration and time invested) a number of them and then look for how to do X, just to move forward. So a big thank you for keeping it short and sweet w/out any other unnecessary dependencies.
Thank guy, have a good day
It's the best unity tutorial video I ever seen
Do you have your VS Code editor formatting method blocks in K&R style as you type or are those subtle jump cuts? I'm going crazy trying to get VSCode C# to stop doing Java style curly braces. Even the Unity snippet extension I'm using formats it that way, but the auto formatter fixes it when I hit the hotkey.
I just want the lightweight-ness of Code with the feeling of Studio typing ahhh
Wow thank you so much, i found it hard to follow on in other peoples videos but you did a really good job at explaining the code and how it is used, so thanks a lot!!!
It would be really helpful when you jump around in the code to show the finished line of code for longer than 1ms before cutting to the next frame
Great video, I was stuck for hours before.
what interpreter are you using? I think mine is basic c#, and I even downloaded Unity for Visual Studio Code.
I simply can't understand why you have 2 dislikes, thank you so much !!!
Appreciate the kind words! Hope it helped
@@BMoDev i cant add my script to player :/
edit: or i can add it on the player
@@BMoDev i wanted to make movement like in zooba or in brawl stars sry but this didnt help me
Now he has 19
@@alexanderschmid6251 If you can't make use of this video to make such easy mouvements maybe it's time to rethink your programming skills and creativity just saying... This video is perfect since he uses physics and the inputs are perfectly managed (I'm not insulting btw it's just what I think)
These videos help so much, my mind just gets stuck somedays and its hard to make even a simple start
Thank you so much for this tutorial
You bet hope it helped!
This is a very simple and good tutorial! I had trouble finding a tutorial that was easy to follow so thank you very much :)
Awesome, happy to hear that!
Really nice video, explained everything really well and very clear. I'm still a beginner for unity and my first real project is making the Atari game from the film Ready Player One and this video was an absolute godsend.
thanks for showing finally able to get my little rpg going!
this is really good! is there a good way to add momentum to the movement?
your tutorials are really short doable and amazing its better than brackeys
brackeys just acts like everyone knows what everything is and does so its not really great for beginners like me so thank you b mo also i love how you reply interact and help people example-
(you helped me on discord with the typo errors and the main menu so i appreciate you BMo
Well I appreciate you watching, thanks! :)
great value in this, plus your voice is really nice. gonna go check out your other videos now!
Thank you so much for explaining why you did the things you did! It really helped me learn!
Ty bro, short tutorial, not some complicated code, this is great Im leaving like and subscribe!
Loved the way you explain things! subbed ;)
Thanks!
I followed the tutorial step by step, but it doesnt work. did i do anything wrong?
You probably are using a newer version of Unity
If you're wondering how to limit diagonal movement speed using the new linearVelocity property, don't normalize the movement vector. Instead, add this line of code after defining moveDirection:
if (moveDirection.magnitude > 1) moveDirection = moveDirection.normalized;
this is the most helpful vid in movement thanks
Glad it helped!
what're your extensions? and how did you show the reference tag on your code?
He is using vscode, im pretty sure its built in. if not try installing the c# exstension
Thank you so much for the quick and easy explanations.
Thanks!
I’m done with trying to learn game developing
I love the quick pace of this tutorial! Super easy to follow. Do animation plz :))))
Awesome! Animation is definitely one of the upcoming videos
@@BMoDev Looking forward to it :D
If u are new like me try and understand the code and not just blindly typing
THANK YOU VERY MUCH GOD BLESS YOU. THE ONLY TUTORIAL I COULD FOLLOW AND IT WORK.
Thank you man! I am making a game and this really helped thank you so much!
How does your VS Code autocompletes that way. Mine sometimes does, sometimes doesnt :( also great tutorial!
thanks this is really helpful, cant believe my drawing can actually move lmao
Wooo lets goo, the next game of the year inbound!
What Visual Studio Code theme are you using? I really like the one.
I think its monokai
Great video! Short and very clear
Nice video man, clear and concise explanation! Thanks a lot!
Can someone give me finished script? I want to compare it
Sure
Thanks for the turorial. The best one I found.
Appreciate ya 🙏
Thanks for the video, even though it was made long ago it is still useful! :)
Thanks! Unity hasnt changed that much so most older videos still apply just fine!
Thank you, it helped me, and was pretty simple.
Thank you so much for this
Sure thing!
Thanks for the tutorial. The intellisense of my VS Code is not working properly; at 2:26, I type "Rigid" and nothing happens. How can I solve this?
yes the same thing was happening to me
You need to set your IDE settings in unity. You do it through preferences
@@mr.bluesman9879 how do i do that?
do u have c# extension
This helped me a lot thank you
Loved this tutorial, it was very easy and quick. Thank you!
I think it's still one of the best tutorials about diagonal movement and you helped me out a lot thanks about that.
WELL DONE!
very helpful, thanks man
You´re tutorial is awesome! Thanks a lot!!
Appreciate it!
hey, having trouble for some reason on ln22 col5 (fixed update) and cant figure out why. any ideas?
Super helpful, amazing, fabulous.
Thank you 🙏
Very good video. Thanks!
love it. it really helped
Thanks, keep it up!
Hey, great tutorial. Im relatively new to unity and I just wanted to make the simplist top down game in the universe but I can't get my movement script to work. Please help
same here
Sorry for the late reply, can you share your code? We'd need to narrow down where the issue could be.
@@BMoDev hey im kinda new to this stuff.. i have "using System.Numerics; in my script and i think its somehow blocking my private Vector 2. Why that? can u explain it to me? EDIT: The problem was that i had [using System.Numerics; and using UnityEngine;] And it somehow didnt know which directory to use.
Same
Hi! Can i ask what theme you're using for that syntax highlighting?
Hey! Can you make a video on how to code a diagonal jump? I tried this but the vector in x direction doesn't seem to work 😥
Help, why does my character go in a top-left direction when I didn't even press my keyboard?
xbox control connected?
yeah I fixed it, it was vjoy lol
whenever i open VSCode on unity and try puttting something like GameObject nothing comes up, and its not the intelli thing cos other tthings come up like try and stuff does anyone know why
For ma bois
Here's the script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
//Public Variables
public float moveSpeed;
public Rigidbody2D rb;
//Private Variables
private Vector2 moveDirection;
void Update()
{
ProcessedInputs();
}
void FixedUpdate()
{
Move();
}
void ProcessedInputs()
{
float moveX = Input.GetAxisRaw("Horizontal");
float moveY = Input.GetAxisRaw("Vertical");
moveDirection = new Vector2(moveX, moveY);
}
void Move()
{
rb.velocity = new Vector2(moveDirection.x * moveSpeed, moveDirection.y * moveSpeed);
}
}
P.S. There is no error.(and dont copy this thing in your script lmao)
thank you my boi
Thank you so much! My script just didn't work for some reason, and now I can properly look at it.
@@SarunasVitkus-x8b ya welcome homie
@@twoidiotsonescreen9443 Glad it helped bud!!!
Thanks for the tutorial, you are very help me, Thank you again))
Sos un capo, master, idolo, crack, genio, lo explicaste bastante bien
Thanks, very cool :D
Great video thank you :D