TOP DOWN Movement - Unity Tutorial
HTML-код
- Опубликовано: 12 июн 2024
- Show your Support & Get Exclusive Benefits on Patreon (Including Access to this tutorial Source Files + Code) - / sasquatchbgames
Join our Discord Community! - / discord
--
Let's have a look at the easiest (and most expandable) way to create top-down movement for your game! - This could easily be adaptaed to suit 8 directional movement as well!
--
Timestamps:
00:00 - What we're making
00:21 - preparing our sprites
01:08 - setting up input
04:31 - player movement
06:14 - setting up the animations
09:06 - setting up the animation transition logic
12:30 - applying the transition logic in code
13:30 - adding idles that look in proper direction
15:44 - adding gamepad support
--
Links:
prf.hn/click/camref:1100lwgBQ...
---
In need of more Unity Assets? Using our affiliate link is a great way to support us. We get a small cut that helps keep us up and running: assetstore.unity.com?aid=1100lwgBQ
---
Who We Are-------------------------------------
If you're new to our channel, we're Brandon & Nikki from Sasquatch B Studios. We sold our house to start our game studio, and work full time on building our business and making our game, Veil of Maia.
Don't forget to Subscribe for NEW game dev videos every Monday & Thursday!
Wishlist our games:
Wishlist Samurado!
store.steampowered.com/app/23...
Wishlist Veil of Maia! - store.steampowered.com/app/19...
Follow us on Twitter for regular updates!
/ sasquatchbgames
#unitytutorial #unity2d #unity3d - Игры
Hey everyone! - Const variables should be typed LIKE_THIS...if you're following standard naming conventions
Completely slipped my mind, just wanted to let you know!
This came at exactly the right time. I needed to refamiliarize myself with blend trees for 2D movement. I was about to go and search for a tutorial but I found that I had your video in my watch later. Thanks for the excellent tutorial as always, Brandon!
These videos are great. Found them a last week and instantly subscribed these are great. EDIT: Went back and rewatched your video and saw where you showed how to turn on the sample size for animations. Once again, awesome videos!
For me it is the best tutorial about top down movement) Thank you for your videos that helps me to keep learning gamedev!
I wanted this!! I'm so happy to finally find this way to move. Thank you!😆
Your method is so clean
thank you so much. You have my utmost respect as this saved me from disappointing my class
Cheers dude! Never heard of the Input System! 😄
Love this tutorial video!
Would definitely enjoy one with a following camera as well :)
Hey I'm new to coding thank you for making the video I've been learning Unity visual scripting and now visual studio coding its fun but super intimidating to learn. Fantastic video thanks for making it!
Thanks for the tutorial!
6:08 If the player movement didn't work, try restarting Unity. It Is going to ask you to enable the new movement backend.
Você é TUDO, eu sou do Brasil e preciso para a minha faculdade. Gratidão demais cara, de verdade
Thank you so much !
Amazing video, ty so much! ❤
Quick question, to add attacks and more complex states, building a State Machine is better? Still learning, and I'm seeing a lot of different approaches.
This is phenomenal! Is it possible to get an Attack tutorial similar to this with Blend Trees??
Aah, a Top-Down-movement tutorial
A true classic 😂. Never seen blendtrees in sprite animation. I guess it does save you some if-statements in code. ✌️
Looking good. So I can also make my project in Unity it seems but it would probably take longer, not sure. I’m using RPG MAKER MV with lots of JavaScript plugins and commands. I started looking at Unity, Python and GM but I’ve found the engine I want to make my game in.
Curious as to why you use the Player Input component as opposed to using the C# class for the Input Actions.
perfect
you can use a variable in the animator called Speed to avoid using a lot of "or" in the animator transition, after that you need to set this on the update method:
animator.SetFloat("Speed", movement.sqrMagnitude);
Can you please help with keeping a character within boundaries using this script? Been trying to use other tutorials but none of them are working! D:
my character animations won't work for left and right?
Gay
Why don’t i have the input system?
see top right where it says packages make sure its set to registry not in project :)
But how do i add buttons so i can play it on andorid?
these should be UI buttons you press (touch)
is there any way i can remove diagonal movement from this?
also great tut by the way deserves a follow
add the following line above the _movement.Set(); on line 26. Just a heads up, it will prioritize X axis movement over Y axis. Maybe someone has a smarter way to do that, but this will get rid of diagonal.
if (InputManager.Movement.x != 0) InputManager.Movement.y = 0;
First