Тёмный

2D Top Down Movement UNITY Tutorial 

BMo
Подписаться 30 тыс.
Просмотров 220 тыс.
50% 1

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

Опубликовано:

 

4 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 592   
@Lipapalidev
@Lipapalidev 6 месяцев назад
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 7 месяцев назад
That's what she said.
@niblitsbopski6586
@niblitsbopski6586 Месяц назад
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.
@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
@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!
@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.
@PolyxTheWise
@PolyxTheWise 7 месяцев назад
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! :)
@blaze4074
@blaze4074 3 года назад
FINNALY a video that will work! i've lost my hair trying to find a top down movement tutorial
@martindotts8262
@martindotts8262 4 года назад
I love how straight to the point this is. :)
@plutoniumbellamy1912
@plutoniumbellamy1912 2 года назад
This is perfect for underwater movement. Thank you for this tutorial!
@CASMANWHAT
@CASMANWHAT 3 года назад
LOVE how you explains stuff. so clear!
@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.
@fishgethirsty6377
@fishgethirsty6377 3 года назад
Awesome tutorial love it, it's straight to the point "this is how you move" lol, thanks for this tutorial 👌
@iamcheezeYT
@iamcheezeYT 3 года назад
best tutorial! telling my friends to come here if they want to learn game dev
@kuyabonbondevlog1044
@kuyabonbondevlog1044 3 года назад
Thank you, your tutorial is the only one working on all of the videos I searched
@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!!!
@patches163
@patches163 Месяц назад
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
@jjadter8139
@jjadter8139 3 года назад
Thank you so much for explaining why you did the things you did! It really helped me learn!
@NamNguyen-uu8yq
@NamNguyen-uu8yq Год назад
TNice tutorials is THE most helpful tutorial on RU-vid imo. I am starting production in Hardstyle, and I find soft soft really useful
@philippthuring686
@philippthuring686 3 года назад
great value in this, plus your voice is really nice. gonna go check out your other videos now!
@toastedtoastyboi
@toastedtoastyboi 3 года назад
im learning game design for a class project and this was helpful. thank you!
@xteclisx27
@xteclisx27 4 года назад
Short and concise! Thank you!
@jacobhuneault3420
@jacobhuneault3420 6 месяцев назад
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
@dhruvsrivastava9846
@dhruvsrivastava9846 4 года назад
Omg this is so much simpler and a better explanation than 3 other videos
@user-qq1xq2zp9v
@user-qq1xq2zp9v 2 месяца назад
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
@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!
@roberthermoso3436
@roberthermoso3436 Год назад
Nice video man, clear and concise explanation! Thanks a lot!
@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.
@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
@TiggyTVAnimations
@TiggyTVAnimations 3 года назад
Thank you man! I am making a game and this really helped thank you so much!
@viksingg6661
@viksingg6661 Год назад
Ty bro, short tutorial, not some complicated code, this is great Im leaving like and subscribe!
@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 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xp37Hz1t1Q8.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.
@leaf4645
@leaf4645 2 года назад
​@@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
@Kualdir
@Kualdir Год назад
Great video! Short and very clear
@DanOfMostTrades
@DanOfMostTrades 3 года назад
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 2 года назад
@@sofisticated1940 Don't disrespect the legend himself.
@IFCreativeAlt
@IFCreativeAlt Год назад
kids hating on brackeys
@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!
@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.
@zombieskull5710
@zombieskull5710 2 года назад
Thank you, it helped me, and was pretty simple.
@unexpectedcringe4575
@unexpectedcringe4575 2 года назад
getting watched latered for the rest of my days thank you
@sdenys3554
@sdenys3554 3 года назад
Thanks for the tutorial, you are very help me, Thank you again))
@johndenis8526
@johndenis8526 Год назад
THANK YOU VERY MUCH GOD BLESS YOU. THE ONLY TUTORIAL I COULD FOLLOW AND IT WORK.
@toster5071
@toster5071 3 года назад
Can someone give me finished script? I want to compare it
@sahildesai4221
@sahildesai4221 2 года назад
Loved the way you explain things! subbed ;)
@BMoDev
@BMoDev 2 года назад
Thanks!
@simi8220
@simi8220 2 года назад
Thank you so much for the quick and easy explanations.
@BMoDev
@BMoDev 2 года назад
Thanks!
@toby_1405
@toby_1405 3 года назад
Thank you so much very good tut!!
@TheDoomLordd
@TheDoomLordd 3 года назад
These videos help so much, my mind just gets stuck somedays and its hard to make even a simple start
@fania676
@fania676 2 года назад
It's the best unity tutorial video I ever seen
@hernandonj
@hernandonj 3 года назад
Very good video. Thanks!
@ozgungor2339
@ozgungor2339 2 года назад
This helped me a lot thank you
@Sock_Croc
@Sock_Croc Год назад
love it. it really helped
@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
@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.
@Indie-A-tom
@Indie-A-tom 2 года назад
Thanks for the turorial. The best one I found.
@BMoDev
@BMoDev 2 года назад
Appreciate ya 🙏
@margarinebutter
@margarinebutter Год назад
very helpful, thanks man
@wizwizard7382
@wizwizard7382 Год назад
hey, having trouble for some reason on ln22 col5 (fixed update) and cant figure out why. any ideas?
@OblviousSnailYT
@OblviousSnailYT 3 года назад
Hi! Can i ask what theme you're using for that syntax highlighting?
@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?
@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
@minayouness
@minayouness 2 года назад
Thank you so much for this tutorial
@BMoDev
@BMoDev 2 года назад
You bet hope it helped!
@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?
@m8te8
@m8te8 Год назад
Thanks, keep it up!
@siryaakov2491
@siryaakov2491 2 года назад
Great video thank you :D
@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)
@Sam4Progress
@Sam4Progress 4 месяца назад
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!
@Montigorable
@Montigorable 3 года назад
Super helpful, amazing, fabulous.
@BMoDev
@BMoDev 3 года назад
Thank you 🙏
@mzerom9515
@mzerom9515 3 года назад
Sos un capo, master, idolo, crack, genio, lo explicaste bastante bien
@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 😥
@iconic2310
@iconic2310 Год назад
thanks for showing finally able to get my little rpg going!
@misspeachyxo
@misspeachyxo 3 года назад
this is so helpful thank you do much!
@BMoDev
@BMoDev 3 года назад
Awesome!
@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!
@KokiriChild1
@KokiriChild1 3 года назад
Loved this tutorial, it was very easy and quick. Thank you!
@Happy_cyn
@Happy_cyn 3 года назад
thank youu for the help!
@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?
@cedricantunes4600
@cedricantunes4600 Год назад
Thanks, very cool :D
@zreakz
@zreakz 4 года назад
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 4 года назад
Nice job!
@alfredfind1219
@alfredfind1219 4 года назад
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 4 года назад
Awesome, happy to hear that!
@togashi-azul
@togashi-azul 11 месяцев назад
Thanks for the video, even though it was made long ago it is still useful! :)
@BMoDev
@BMoDev 11 месяцев назад
Thanks! Unity hasnt changed that much so most older videos still apply just fine!
@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.
@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.
@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!
@gettinjcob4206
@gettinjcob4206 3 года назад
this is the most helpful vid in movement thanks
@BMoDev
@BMoDev 3 года назад
Glad it helped!
@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
@user-hp2ct5yu9e
@user-hp2ct5yu9e 2 года назад
THX helped a lot
@mrlaughgas
@mrlaughgas 7 месяцев назад
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);
@cardario5323
@cardario5323 2 года назад
It scares me how good theses tutorials are!
@BMoDev
@BMoDev 2 года назад
Wow appreciate it
@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
@siriusk1438
@siriusk1438 Год назад
my gameobject continues moving for arround 1 sec after i stop pressing the axis key. What can i do to when i stop pressing the key the gameobject stops moving at the same moment ?
@santaman9319
@santaman9319 Год назад
Thank guy, have a good day
@RootsOf7
@RootsOf7 Месяц назад
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.
@hezroncalucag8080
@hezroncalucag8080 2 года назад
Thank you so much for this
@BMoDev
@BMoDev 2 года назад
Sure thing!
@anthonyvaught7039
@anthonyvaught7039 3 года назад
I am having one issue. The processinputs command isnt found for me. It doesn't recognize it when it is typed.
@NoThumbsSins
@NoThumbsSins 2 года назад
I'm having trouble I did exactly this and it doesn't work I've gone over it multiple times and it doesn't say there is any issues but then says all issues must be fixed before compiling?
@notinyourwalls1510
@notinyourwalls1510 2 года назад
i have been trying to add movement to my topdown rpg for a wile now but every time I try to enter play mode It says all compiler errors have to be fixed before I enter playmode can someone tell me how to fix it I would greatly appreciate it
@TomationuJaDark1x
@TomationuJaDark1x Год назад
It gave me an error saying "The name moveX/moveY does not exist in the current context". Is there any way i can fix this?
@theblaze89miller
@theblaze89miller Год назад
thank you!
@KuhHirte
@KuhHirte 3 года назад
which writing system do you use my one is bad and i clicked tat it always open with this and cant change it:( the tutorial is good but i am bad
@chris.davidoff
@chris.davidoff 3 года назад
What do you do objects that want to apply a force to your player though?
@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 ?
@aqumy
@aqumy 4 года назад
what file does the sprite has to be?
Далее
2D Top Down Shooting POINT & CLICK Unity Tutorial
13:55
TOP DOWN Movement - Unity Tutorial
16:17
Просмотров 10 тыс.
Редакция. News: 128-я неделя
57:33
Просмотров 1,6 млн
TOP DOWN MOVEMENT in Unity!
22:30
Просмотров 1,2 млн
I Made A Platformer Game But You're The Enemy
6:12
Просмотров 480 тыс.
We made Vampire Survivors BUT in 10 Lines of Code
7:08
Why Making Multiplayer Games SUCKS
6:46
Просмотров 415 тыс.
Character Controller in Unity 2D! (Move, Dodge, Dash)
23:41
Optimizing my Game so it Runs on a Potato
19:02
Просмотров 520 тыс.
A new way to generate worlds (stitched WFC)
10:51
Просмотров 520 тыс.
I Made the Same Game in 8 Engines
12:34
Просмотров 4 млн
How to Make a Good 2D Camera
11:38
Просмотров 395 тыс.