2D Top Down Movement UNITY Tutorial

  Рет қаралды 213,894

BMo

BMo

Күн бұрын

In this Unity Tutorial we'll cover how to move a 2D character or player around the scene from a top down perspective. This tutorial won't cover animations, but it does cover how to move correctly using Unity's built-in physics system and input system.
This tutorial is a great starting point for beginners to get their feet wet with game development. It also can act as a refresh for Intermediate+ developers.
Hope it helps!
✨Want to support the channel?
Buy me a coffee ☕: ko-fi.com/bmoli
➤Join the new DISCORD SERVER: / discord
➤Want to make video games? Start with my tutorial Playlist: • Epic Unity Tutorials
➤5 Minute Tutorial Series: • 5 Minute Games
➤Don't forget to SUBSCRIBE for all the upcoming content.
Thanks for watching!!
#bmo #unity #tutorial

Пікірлер: 590
@Lipapalidev
@Lipapalidev 4 ай бұрын
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
@theduckyt9357
@theduckyt9357 3 жыл бұрын
Simple, straight to the point and only 7 minutes long. Love it.
@user-qq2jh4ep6u
@user-qq2jh4ep6u 5 ай бұрын
That's what she said.
@GeckoTech_Engineer
@GeckoTech_Engineer Жыл бұрын
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
@AsanpiCh
@AsanpiCh 3 жыл бұрын
Short, simple, and it works! As an artist trying to learn code, thank you!
@toiletdroid5914
@toiletdroid5914 2 жыл бұрын
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.
@koshiinahole1003
@koshiinahole1003 3 жыл бұрын
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!
@thecanaeggplant2937
@thecanaeggplant2937 3 жыл бұрын
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.
@martindotts8262
@martindotts8262 3 жыл бұрын
I love how straight to the point this is. :)
@CASMANWHAT
@CASMANWHAT 3 жыл бұрын
LOVE how you explains stuff. so clear!
@iamcheezeYT
@iamcheezeYT 3 жыл бұрын
best tutorial! telling my friends to come here if they want to learn game dev
@plutoniumbellamy1912
@plutoniumbellamy1912 2 жыл бұрын
This is perfect for underwater movement. Thank you for this tutorial!
@PolyxTheWise
@PolyxTheWise 4 ай бұрын
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! :)
@fishgethirsty6377
@fishgethirsty6377 3 жыл бұрын
Awesome tutorial love it, it's straight to the point "this is how you move" lol, thanks for this tutorial 👌
@toastedtoastyboi
@toastedtoastyboi 3 жыл бұрын
im learning game design for a class project and this was helpful. thank you!
@blaze4074
@blaze4074 3 жыл бұрын
FINNALY a video that will work! i've lost my hair trying to find a top down movement tutorial
@thatrealguylogan
@thatrealguylogan 2 жыл бұрын
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!!!
@philippthuring686
@philippthuring686 3 жыл бұрын
great value in this, plus your voice is really nice. gonna go check out your other videos now!
@user-qq1xq2zp9v
@user-qq1xq2zp9v Күн бұрын
Everything that I needed was here all the time...thanks for sharing your skills.
@nikhilshelke9398
@nikhilshelke9398 2 жыл бұрын
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!
@BMoDev
@BMoDev 2 жыл бұрын
Appreciate it! Would love to keep tabs on your game
@kuyabonbondevlog1044
@kuyabonbondevlog1044 3 жыл бұрын
Thank you, your tutorial is the only one working on all of the videos I searched
@jjadter8139
@jjadter8139 2 жыл бұрын
Thank you so much for explaining why you did the things you did! It really helped me learn!
@xteclisx27
@xteclisx27 3 жыл бұрын
Short and concise! Thank you!
@happydoggo1235
@happydoggo1235 Жыл бұрын
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.
@DanOfMostTrades
@DanOfMostTrades 2 жыл бұрын
I appreciate your speed and conciseness! Other tutorials are finishing up their promotions and introduction at 7:20
@sofisticated1940
@sofisticated1940 2 жыл бұрын
*cough* *cough* brakeys *cough* *cough"
@DarioMarken
@DarioMarken Жыл бұрын
@@sofisticated1940 Don't disrespect the legend himself.
@IFCreativeAlt
@IFCreativeAlt Жыл бұрын
kids hating on brackeys
@roberthermoso3436
@roberthermoso3436 Жыл бұрын
Nice video man, clear and concise explanation! Thanks a lot!
@dhruvsrivastava9846
@dhruvsrivastava9846 3 жыл бұрын
Omg this is so much simpler and a better explanation than 3 other videos
@joemullen7789
@joemullen7789 2 жыл бұрын
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!!!
@BMoDev
@BMoDev 2 жыл бұрын
Love to hear it, keep going! Feel free to share your progress in the discord would love to see what you make!
@Zephyr314
@Zephyr314 2 жыл бұрын
same here!
@wickjon1844
@wickjon1844 2 жыл бұрын
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
@koolkiller35 2 жыл бұрын
I'm sorry I'm new to coding and don't understand. Can you explain that in a bit more detail?
@wickjon1844
@wickjon1844 2 жыл бұрын
​@@koolkiller35 You can refer here in 1:28 and 2:09 kzbin.info/www/bejne/rqGWaHuwZtlkh5o 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.
@leaf4645
@leaf4645 Жыл бұрын
​@@koolkiller35in the rigid body where u adjust the gravity, there is an potion called "bodytype" change that from dynamic to kinematic
@TheWeatherMan2
@TheWeatherMan2 Жыл бұрын
Good shout honestly
@NamNguyen-uu8yq
@NamNguyen-uu8yq Жыл бұрын
TNice tutorials is THE most helpful tutorial on KZbin imo. I am starting production in Hardstyle, and I find soft soft really useful
@stipularbench1534
@stipularbench1534 3 жыл бұрын
OMFG the best tutorial easy to follow and I learned soooo much KEEP GOING
@BMoDev
@BMoDev 3 жыл бұрын
No doubt, glad it helped!
@toster5071
@toster5071 3 жыл бұрын
Can someone give me finished script? I want to compare it
@TiggyTVAnimations
@TiggyTVAnimations 3 жыл бұрын
Thank you man! I am making a game and this really helped thank you so much!
@keventy6114
@keventy6114 4 жыл бұрын
Thanks! I did this and linked it with the Animator StateMachine- with the Horizontal and Vertical inputs - to make very smooth-looking movements.
@BMoDev
@BMoDev 4 жыл бұрын
Ayy nice work! You're ahead of the game, that was going to be a followup video :)
@keventy6114
@keventy6114 4 жыл бұрын
@@BMoDev That's great to hear! Looking forward to watching the next.
@Kualdir
@Kualdir Жыл бұрын
Great video! Short and very clear
@des757
@des757 4 жыл бұрын
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
@jacobhuneault3420
@jacobhuneault3420 4 ай бұрын
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
@sahildesai4221
@sahildesai4221 2 жыл бұрын
Loved the way you explain things! subbed ;)
@BMoDev
@BMoDev 2 жыл бұрын
Thanks!
@zombieskull5710
@zombieskull5710 2 жыл бұрын
Thank you, it helped me, and was pretty simple.
@jazzyjaiden
@jazzyjaiden 2 жыл бұрын
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.
@TheDoomLordd
@TheDoomLordd 2 жыл бұрын
These videos help so much, my mind just gets stuck somedays and its hard to make even a simple start
@bhartisharma139
@bhartisharma139 2 жыл бұрын
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)
@viksingg6661
@viksingg6661 Жыл бұрын
Ty bro, short tutorial, not some complicated code, this is great Im leaving like and subscribe!
@logosrule
@logosrule 2 жыл бұрын
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.
@Eee___59
@Eee___59 Жыл бұрын
I can't type I need help
@trickshotsquirrel
@trickshotsquirrel 11 ай бұрын
​@@Eee___59why are you coding then
@GarySSBM
@GarySSBM 6 ай бұрын
Omg, glad you’re ok!
@werejustgaming
@werejustgaming 4 ай бұрын
Yeah my problem but I can't make it work
@Sock_Croc
@Sock_Croc Жыл бұрын
love it. it really helped
@toby_1405
@toby_1405 3 жыл бұрын
Thank you so much very good tut!!
@mattheww1072
@mattheww1072 4 жыл бұрын
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
@BMoDev
@BMoDev 4 жыл бұрын
Thanks for sharing!
@everything-we9rc
@everything-we9rc 2 жыл бұрын
surprisingly hard to find videos about top down movement and this tutorial was very helpful
@BMoDev
@BMoDev 2 жыл бұрын
I've always thought that too, np
@ozgungor2339
@ozgungor2339 2 жыл бұрын
This helped me a lot thank you
@hernandonj
@hernandonj 2 жыл бұрын
Very good video. Thanks!
@margarinebutter
@margarinebutter Жыл бұрын
very helpful, thanks man
@sdenys3554
@sdenys3554 3 жыл бұрын
Thanks for the tutorial, you are very help me, Thank you again))
@simi8220
@simi8220 Жыл бұрын
Thank you so much for the quick and easy explanations.
@BMoDev
@BMoDev Жыл бұрын
Thanks!
@jaygo3721
@jaygo3721 4 жыл бұрын
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
@mzerom9515
@mzerom9515 3 жыл бұрын
Sos un capo, master, idolo, crack, genio, lo explicaste bastante bien
@inflameMC
@inflameMC Жыл бұрын
Thanks, keep it up!
@Sam4Progress
@Sam4Progress 2 ай бұрын
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!
@unexpectedcringe4575
@unexpectedcringe4575 2 жыл бұрын
getting watched latered for the rest of my days thank you
@siryaakov2491
@siryaakov2491 Жыл бұрын
Great video thank you :D
@Indie-A-tom
@Indie-A-tom 2 жыл бұрын
Thanks for the turorial. The best one I found.
@BMoDev
@BMoDev 2 жыл бұрын
Appreciate ya 🙏
@azaankaleem09
@azaankaleem09 3 жыл бұрын
Most useful vid ever thank u
@fania676
@fania676 2 жыл бұрын
It's the best unity tutorial video I ever seen
@d.w.6584
@d.w.6584 2 жыл бұрын
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.
@cardario5323
@cardario5323 Жыл бұрын
It scares me how good theses tutorials are!
@BMoDev
@BMoDev Жыл бұрын
Wow appreciate it
@minayouness
@minayouness 2 жыл бұрын
Thank you so much for this tutorial
@BMoDev
@BMoDev 2 жыл бұрын
You bet hope it helped!
@cedricantunes4600
@cedricantunes4600 Жыл бұрын
Thanks, very cool :D
@cynthiawilliams5553
@cynthiawilliams5553 3 жыл бұрын
thank youu for the help!
@wizwizard7382
@wizwizard7382 10 ай бұрын
hey, having trouble for some reason on ln22 col5 (fixed update) and cant figure out why. any ideas?
@owenbrewster521
@owenbrewster521 4 жыл бұрын
I love the quick pace of this tutorial! Super easy to follow. Do animation plz :))))
@BMoDev
@BMoDev 4 жыл бұрын
Awesome! Animation is definitely one of the upcoming videos
@owenbrewster521
@owenbrewster521 4 жыл бұрын
@@BMoDev Looking forward to it :D
@ADITYA3GAME
@ADITYA3GAME 3 жыл бұрын
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 😥
@OblviousSnailYT
@OblviousSnailYT 3 жыл бұрын
Hi! Can i ask what theme you're using for that syntax highlighting?
@iconic2310
@iconic2310 Жыл бұрын
thanks for showing finally able to get my little rpg going!
@johndenis8526
@johndenis8526 Жыл бұрын
THANK YOU VERY MUCH GOD BLESS YOU. THE ONLY TUTORIAL I COULD FOLLOW AND IT WORK.
@Nolan_975
@Nolan_975 3 жыл бұрын
hey! ty for your tutorial but t have an error in the console: Assets\PlayerMouvement.cs(35,74): error CS1061: 'float' does not contain a definition for 'y' and no accessible extension method 'y' accepting a first argument of type 'float' could be found (are you missing a using directive or an assembly reference?) can you help me?
@theblaze89miller
@theblaze89miller 10 ай бұрын
thank you!
@user-hp2ct5yu9e
@user-hp2ct5yu9e 2 жыл бұрын
THX helped a lot
@Montigorable
@Montigorable 3 жыл бұрын
Super helpful, amazing, fabulous.
@BMoDev
@BMoDev 3 жыл бұрын
Thank you 🙏
@togashi-azul
@togashi-azul 8 ай бұрын
Thanks for the video, even though it was made long ago it is still useful! :)
@BMoDev
@BMoDev 8 ай бұрын
Thanks! Unity hasnt changed that much so most older videos still apply just fine!
@laughingpanda95
@laughingpanda95 Жыл бұрын
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
@misspeachyxo
@misspeachyxo 3 жыл бұрын
this is so helpful thank you do much!
@BMoDev
@BMoDev 3 жыл бұрын
Awesome!
@geekhatter5722
@geekhatter5722 3 жыл бұрын
When I type in 'void FixedUpdate' it doesn't create all this other stuff, it also doesn't show me all the other options for commands you have, the ones with that orange image you also have next to 'PlayerMovement' up top, which I also don't have. My file path ends at '> PlayerMovement.cs', am I missing some file?
@santaman9319
@santaman9319 Жыл бұрын
Thank guy, have a good day
@inkadastinka7600
@inkadastinka7600 3 жыл бұрын
when i type public float moveSpeed; and public Rigidbody2D rb; it does not show anything under the tab and I have not found anything on the forum that can help me.
@alfredfind1219
@alfredfind1219 3 жыл бұрын
This is a very simple and good tutorial! I had trouble finding a tutorial that was easy to follow so thank you very much :)
@BMoDev
@BMoDev 3 жыл бұрын
Awesome, happy to hear that!
@potantirittisak8494
@potantirittisak8494 2 жыл бұрын
THANK YOU!
@gettinjcob4206
@gettinjcob4206 3 жыл бұрын
this is the most helpful vid in movement thanks
@BMoDev
@BMoDev 3 жыл бұрын
Glad it helped!
@chris.davidoff
@chris.davidoff 3 жыл бұрын
What do you do objects that want to apply a force to your player though?
@hezroncalucag8080
@hezroncalucag8080 2 жыл бұрын
Thank you so much for this
@BMoDev
@BMoDev 2 жыл бұрын
Sure thing!
@KokiriChild1
@KokiriChild1 3 жыл бұрын
Loved this tutorial, it was very easy and quick. Thank you!
@zreakz
@zreakz 3 жыл бұрын
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!
@BMoDev
@BMoDev 3 жыл бұрын
Nice job!
@kjudu4159
@kjudu4159 3 жыл бұрын
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!
@mrlaughgas
@mrlaughgas 5 ай бұрын
Is there a reason you received the inputs and put them into the moveDirection vector only to separate the components again with: rb.velocity = new Vector2(moveDirection.x * movespeed, moveDirection.y * movespeed); Could you just do: rb.velocity = new Vector2(moveX * movespeed, moveY * movespeed);
@mohamedmomax4652
@mohamedmomax4652 Жыл бұрын
Thank u bro
@bottleogames
@bottleogames 3 жыл бұрын
ive watched this a few times now its saying "Assets\Scripts\PlayerMovement2d.cs(26,23): error CS0103: The name 'GetAxis' does not exist in the current context" can you help?
@zilvi_69
@zilvi_69 3 жыл бұрын
Thanks!
@sueray5771
@sueray5771 2 жыл бұрын
Thank you
@zippich7495
@zippich7495 3 жыл бұрын
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
@ICapCorn
@ICapCorn 3 жыл бұрын
Кстати я тоже русский
@henrykrieger3381
@henrykrieger3381 3 жыл бұрын
I need help! In the script is the command: public Rigitbody rb; flawed or with other words rigitbody wont me displayed.What am I doing wrong! PS: Sorry for my englisch I come aus germany
@NeoniumOxide
@NeoniumOxide 3 жыл бұрын
thank you so much
@ZohMyGods
@ZohMyGods 2 жыл бұрын
is there are reason to create a new Vector2 every time? isnt it better to create a velocity and initialize it on the Start function and just update rb.velocity to velocity ?
@noahmosterd
@noahmosterd Жыл бұрын
thank!
2D Top Down Shooting POINT & CLICK Unity Tutorial
13:55
TOP DOWN Movement - Unity Tutorial
16:17
Sasquatch B Studios
Рет қаралды 7 М.
¡Puaj! No comas piruleta sucia, usa un gadget 😱 #herramienta
00:30
JOON Spanish
Рет қаралды 22 МЛН
Как быстро замутить ЭлектроСамокат
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 8 МЛН
КАК СПРЯТАТЬ КОНФЕТЫ
00:59
123 GO! Shorts Russian
Рет қаралды 2,8 МЛН
어른의 힘으로만 할 수 있는 버블티 마시는법
00:15
진영민yeongmin
Рет қаралды 7 МЛН
TOP DOWN MOVEMENT in Unity!
22:30
Brackeys
Рет қаралды 1,2 МЛН
Unity Top Down Colliders and Character Movement - Tutorial
8:32
CouchFerret makes Games
Рет қаралды 190 М.
Character Controller in Unity 2D! (Move, Dodge, Dash)
23:41
Code Monkey
Рет қаралды 116 М.
Unity Top Down Level Design with Grids and Sorting Order - Tutorial
10:51
CouchFerret makes Games
Рет қаралды 124 М.
2D water magic
10:21
Steve Mould
Рет қаралды 234 М.
2D Melee in Unity Tutorial
19:46
Muddy Wolf
Рет қаралды 14 М.
What Jumping Spiders Teach Us About Color
32:37
Veritasium
Рет қаралды 1,1 МЛН
Top down передвижение в Unity
14:42
GDev Academy
Рет қаралды 83 М.
How the haters saved my game
9:00
samyam
Рет қаралды 11 М.
¡Puaj! No comas piruleta sucia, usa un gadget 😱 #herramienta
00:30
JOON Spanish
Рет қаралды 22 МЛН