Character Movement in Unity 3D | New Input System + Root Motion Explained

  Рет қаралды 169,307

iHeartGameDev

iHeartGameDev

Күн бұрын

Пікірлер: 351
@AetherXIV
@AetherXIV 4 жыл бұрын
wow that was one of the best tutorials I've seen. you show us everything AND most importantly -explain why. Thank you very much
@Hakohn2511
@Hakohn2511 3 жыл бұрын
Brackeys is gone, but seems like we have a new one here that may be taking his crown :D
@remcrap1139
@remcrap1139 3 жыл бұрын
He has potential
@devinmcgee5265
@devinmcgee5265 3 жыл бұрын
I was thinking the same thing!!
@lqd8367
@lqd8367 3 жыл бұрын
Brackeys helped us in though time ......
@Ihasfinger911
@Ihasfinger911 2 жыл бұрын
He's not Scandinavian, no sale!😂
@StevenBloomfield
@StevenBloomfield 4 жыл бұрын
I like how you bring focus to the proper section of the UI by either zooming and blurring background or using the red arrows. Also nice to see a reminder of what was entered in the UI while going over the script.
@colorzFX
@colorzFX 3 жыл бұрын
Timestamps AND actual explanations? Thank god I found your channel
@mikedavies4237
@mikedavies4237 Жыл бұрын
At 13:58 you should add another handler: input.CharacterControls.Movement.canceled += ctx => movementPressed = false; If you don't do this then movement will not cancel if the user doesn't guide the stick back into the deadzone (they just release it so it snaps backs to centre). Will save someone 30 minutes trying to find where the bug is.
@drmeatball124
@drmeatball124 9 ай бұрын
Had this issue, thought it was my controller failing.. ty!
@Hoptronics
@Hoptronics 7 ай бұрын
This comment is Golden when using the keyboard.. I had to put it on everything, aim, shoot, jump I'm still figuring out how I can get what I need outta the input system but.. yeah I'm closer now.. thanks again..
@mohmmadatalla4664
@mohmmadatalla4664 4 ай бұрын
@judzam14
@judzam14 3 ай бұрын
@@mohmmadatalla4664 Dude you saved me, the input was setting the bool to true and this was the only way I found to set it to false, luv ya appreciate ya
@andreyradostny
@andreyradostny 2 ай бұрын
Thank you so much for saving my 30 minutes! 🤝
@RussmanDesignHD
@RussmanDesignHD 4 жыл бұрын
This is one of the best tutorials on Input I've seen in a long time! Very understanding in explanations. I hope you do much more in the future.
@aniketsinghrawat7887
@aniketsinghrawat7887 3 ай бұрын
I have been trying to do some animations on a basic character for a week now. Finally, everything was resolved by this video. Thanks for the help
@sam-2796
@sam-2796 2 жыл бұрын
Thank you for well explained tutorials, you have helped me a lot keep going man, i just want to mention 7:23 guys make sure that you choose pass through ( Action Type ) otherwise the player will keep moving in the idle state i've discovered this problem after 9 hours of digging Lol small advice make sure you have a cup of coffee to avoid these types of mistake xD, Again Thank you so much !!
@blackulrich
@blackulrich 2 жыл бұрын
Thank you very much!
@juansotomayor9076
@juansotomayor9076 9 ай бұрын
Damn, you saved me a lot of frustration!. Any reason why that happens?
@AlexBlackfrost
@AlexBlackfrost 2 жыл бұрын
Almost 2 years later I still come back to the root motion section. It's explained way better than in the docs.
@iHeartGameDev
@iHeartGameDev 2 жыл бұрын
You know it, bro! 🙏
@charuzu1397
@charuzu1397 2 жыл бұрын
Been binging your vids all day to get a better understanding of movement controllers in unity, i love your vids man, thanks for being awesome!
@galogalliani1746
@galogalliani1746 2 жыл бұрын
TNice tutorials tutorial is so useful,I tried tons of other tutorials but tNice tutorials was the best one
@ddinoboy
@ddinoboy Жыл бұрын
lol 3:53 on pause helped me more than dozens of videos. thanks!
@sonisinha8912
@sonisinha8912 4 жыл бұрын
The best tutorial for learning animation character controlling.U are the best Sir!
@blend-eren9526
@blend-eren9526 4 жыл бұрын
I've been waiting for this video for so long, thank you!
@CymbalMonkey
@CymbalMonkey 3 жыл бұрын
Found this by chance but you explained this really well, making it far more understandable than others I have watched. Giving the info really is key for any viewers to learn so this was perfect. Good job, subbed for future stuff!
@ninjaser6449
@ninjaser6449 4 жыл бұрын
Everytime I looking for something he always does it thank you
@tayyabchadhar3876
@tayyabchadhar3876 4 ай бұрын
man I still love your work and the dedication you put into it. it is just amazing. Thanks for sharing.
@Chickengbs
@Chickengbs 4 жыл бұрын
Nicky my man, We love youuuuuuuuuu!! We're so greatful for all the work and effort. Please give up more! :D
@Cerealfrog
@Cerealfrog 3 жыл бұрын
So glad I took a chance watching this. It's criminal that you don't have a bigger following, this was a very well made instructional!
@toyfox4228
@toyfox4228 2 жыл бұрын
TNice tutorials is by far, the best tutorial I have found so far. I feel like I’ll be spending a lot of ti on your channel! Thanks man! Keep up the good
@ajmckennan1663
@ajmckennan1663 4 жыл бұрын
It’s here! Woohoo!!! Amazing stuff as always!
@Khomeini_N.S.E
@Khomeini_N.S.E 4 жыл бұрын
You've done it again MR. Nicky
@abhinavsatheesh9640
@abhinavsatheesh9640 3 жыл бұрын
dude your great .I watched your video when ever i have doubt in player animation, you really deserve a medal .Thank you once again
@ambiguouscompany
@ambiguouscompany 2 жыл бұрын
Man OG OG I been messing with that Unity input system and no one out here explaining the callback f(x) like you. I been watching all these weird writing event function stuff and it make no sense to me. Been just reference my control scheme states instead of that performed function...still work, now I can pull out them more complex parameters like duration of that button press... Love your tutorials mane
@denizhacoglu1680
@denizhacoglu1680 4 жыл бұрын
I'm glad you are back! Keep continue brother.
@eterlan2538
@eterlan2538 3 жыл бұрын
hey! thanks for your tutorial! Really well understanding and explicitly. I want to make a few suggestions about the code.(might be wrong..) 1. Instead of using if statement in the Update loop, I think using CharacterControls.Movement.cancelled to "SetBool = false" is better for performance. 2. There is no need to decide whether movementPressed is true or false using currentMovement.x != 0 || currentMovement.y != 0, because when the "performed" callback is in response, the button is pressed certainly.
@iHeartGameDev
@iHeartGameDev 3 жыл бұрын
Hey Eterlan! If you find more efficient ways of doing things in the code and everything works, go for the refactor! Code is always open to being optimized and refactored for the better! Love to see it, honestly. Cheers 🍻 -Nicky
@Tiger66261
@Tiger66261 3 жыл бұрын
Absolutely brilliant tutorial. Your combination of clear instructions and great video editing is the perfect combination.
@m0ch1_6
@m0ch1_6 4 жыл бұрын
Underrated tutorial... You deserve Million sub's.. Great vid
@GilbertDevs
@GilbertDevs 4 жыл бұрын
Probably another really great tutorial I'll have to learn later today. Hope your Channel grows big, you put so much effort into it, and they come out as the best tutorials I've seen.
@aarondavidlewis
@aarondavidlewis 4 жыл бұрын
After a series of really great videos, I'm now watching every video you post... which I do with only about 20 creators out of the hundreds of great youtubers on my shortlists. Keep up the great work.
@dreamisover9813
@dreamisover9813 4 жыл бұрын
Thanks! Very good and digestive tutorial. Sometimes when I watch tutorials, it feels like I need some discipline to keep watching, but for this, time passed in an instant, it flew so well.
@qwerty6vov
@qwerty6vov 3 жыл бұрын
that the best nwq input system tutorial! big thanks!
@Jet_Mishemoto
@Jet_Mishemoto 3 жыл бұрын
Dude your tutorials are a saving grace please continue the work you’re doing
@wesley6442
@wesley6442 11 ай бұрын
Thank you so much for this informative series, I am terrible with code but am forcing myself to go through the steps and follow along, its really what drives the game so I have to learn some of it haha, for a good while I was fighting with the code and using copilot and chatgpt to figure out why my character kept moving despite letting go of the thumb stick and I figured out it was my controllers sensitivity, it would be above a certain threshold even if I thought it was centered, its not a really old controller but the inputs are apparently a little sensitive
@TrippyGamer
@TrippyGamer 3 жыл бұрын
This is THE BEST tutorial!!! on the new input system why doesn't it has more views!!?!?!!
@ignacio3602
@ignacio3602 2 жыл бұрын
you're a great teacher, love the simplicity, with details! subbed!
@LaurentBRISSON
@LaurentBRISSON 3 жыл бұрын
You are great! I've been looking for an explanation of the new input system for a long time and you explain things really well, in a clear and simple way! Thank you!
@iHeartGameDev
@iHeartGameDev 3 жыл бұрын
Thanks so much Laurent!
@synapticstudios6388
@synapticstudios6388 4 жыл бұрын
Fantastic. Great job Nicky.
@moniques1377
@moniques1377 2 жыл бұрын
Loving your content ⭐⭐⭐⭐⭐
@OFCIFR
@OFCIFR Жыл бұрын
I found this video to be very complicated compared with how easy you make everything to understand in other videos. Good job anyway !
@freddycortina
@freddycortina 2 жыл бұрын
I think you are the best unity helper on all universe thanks to you for helping us so much
@iHeartGameDev
@iHeartGameDev 2 жыл бұрын
thanks Freddy!
@blabli9978
@blabli9978 4 жыл бұрын
hes just like us he didnt know about this, but he learned it and shared it to us. Thanks a lot!
@TheAguilacelestial
@TheAguilacelestial 4 жыл бұрын
Excellent job Nicky! Keep it up!!
@IamMegaJustMega
@IamMegaJustMega Жыл бұрын
This is an amazing video to learn the new input system.
@heyitsnev
@heyitsnev 3 жыл бұрын
in unity i get an error that states (Parameter 'Hash 20590411' does not exist) how do you fix that?
@alexjackson3767
@alexjackson3767 4 жыл бұрын
Awesome stuff my man :)
@akashjaiswar9437
@akashjaiswar9437 4 жыл бұрын
Awesome job to you Unicky (Bad pun😅)(Replying to your awesome job to us in the ending). Understood root motion and the new Input system. Excited for the next videos in the series.
@missmealey
@missmealey 3 жыл бұрын
Really useful video, super easy to follow and everything was explained so well! Thanks
@chupitheslug
@chupitheslug 3 жыл бұрын
You're tutorials are so awesum!!!
@Radek_M.
@Radek_M. Жыл бұрын
The issues: 14:44 when you tap the joystick player X position value is increasing (player is turning right) 16:09 again when you tap the yoystick X is increasing and also Y is decreasing (player is turning right and goes slowly under the plane). How to fix this?
@AspiringHeroGames
@AspiringHeroGames 3 жыл бұрын
Thank you so much for creating this tutorial! It's been a great help for transitioning to the new Input System from the old one! Subscribed!
@iHeartGameDev
@iHeartGameDev 3 жыл бұрын
Thank you for watching Aspiring Hero Games! Good luck with your dev journey
@yokj9081
@yokj9081 3 жыл бұрын
@@iHeartGameDev excuse me I have some unity question. somebody can help me?I am Taiwanese so my English is not well.
@phantomdragonstudio252
@phantomdragonstudio252 3 жыл бұрын
Most Underrated channel in game dev.
@iHeartGameDev
@iHeartGameDev 3 жыл бұрын
Cheers! 🍻
@cookiewood6727
@cookiewood6727 3 жыл бұрын
Amazing tutorial, keep it up the good work !
@macleodgordon
@macleodgordon 3 жыл бұрын
So I did this 5 times now and my character did not move from Idle. Then I checked 'on' the 2 Boolean parameters you created at 2:29, and it worked (albeit, he only walks, doesn't run), yet your character moved, walks, then runs, then walks, then runs.... How is that possible?
@hackerasaweshacreasedd
@hackerasaweshacreasedd 2 жыл бұрын
You have no idea how grateful I am for tNice tutorials series
@signalised9540
@signalised9540 4 жыл бұрын
Clean and informative video, thank you+
@JustBitsAndPieces
@JustBitsAndPieces 3 жыл бұрын
wow this is so well made, more please just found the channel
@iHeartGameDev
@iHeartGameDev 3 жыл бұрын
Thanks for watching JustBitsAndPieces! :D
@tauheedgamedev2388
@tauheedgamedev2388 4 жыл бұрын
Nice, your animation tutorials are so useful
@Bugzzyy
@Bugzzyy 3 жыл бұрын
Dude you're AMAZING! You explain as you show how/where to find it. You show where to find it again with arrows. I could go on lol, but thanks your tutorial are what is was looking for. Thank you!!!
@iHeartGameDev
@iHeartGameDev 3 жыл бұрын
Thanks so much Bugzzy! 😊 happy to hear that you like the videos!!
@vishnudevvasudevanpillai2461
@vishnudevvasudevanpillai2461 2 жыл бұрын
with it in a few weeks or months if I pour enough ti and effort into it. I'll be watcNice tutorialng many more of your videos for tips and inspiration.
@th3R341W3n
@th3R341W3n 3 жыл бұрын
Hi I want to know on 13:42, when your cursor is on ReadValueAsButton, there's API explanation appears. I want to know how do you do that in VSCode? I moved my cursor to that keyword, and hold Ctrl key, and there's only some syntax statements appear...
@itadori6807
@itadori6807 2 жыл бұрын
fav and tysvm for this tutorial it was helpful❤️.
@iHeartGameDev
@iHeartGameDev 2 жыл бұрын
Thank you! Hope the newer content helps too!
@Oleg_UE5
@Oleg_UE5 2 жыл бұрын
One more great tutorial! Are you planning to make series about IK you mentioned before?
@icarosh1
@icarosh1 3 жыл бұрын
I don't know if someone already asked, but how do the values get reset after receiving the input? runPressed will always be true after the first input (Run.performed). Same for currentMovement values they will always be 1 as soon as you press they key. I had to use CharacterControls.Movement.canceled in order to stop the motion. Is that the way is supposed to be? My question is how do you recognize a key being held with the new input system when the values do not update every frame? Thanks for the tutorials
@RehtseStudio
@RehtseStudio 4 жыл бұрын
I like to see how other use the new Input System, well done Nicky👍.
@blackspear7257
@blackspear7257 4 жыл бұрын
Great video!! Eager for the video on Animation Rigging package! 😄
@samyam
@samyam 4 жыл бұрын
Great video! Tons of useful information 🙂
@watercat1248
@watercat1248 3 жыл бұрын
2:30 this the part i wash looking for but how im able to do smarting like this on the event system ?
@ajithraj1206
@ajithraj1206 3 жыл бұрын
I've a problem with the joystick..... Whenever I move a joystick (little bit) the speed of the player is slow but when I move joystick farther speed is normal...I'm using 2D rootMotion
@macleodgordon
@macleodgordon 3 жыл бұрын
So, at 8:05 where you clicked the controller, when I did that, nothing happens, I had to right-click the controller and choose 'Open Device Debug View', only then did I see the activity you show in your video when clicking various controls on the controller. Thought this might help others.
@andrewwhitton1812
@andrewwhitton1812 3 жыл бұрын
soooo... how does this work with the previous animator tutorial where we used the velocity float to blend and play the animations for walk to run? finding the new input system to be quite confusing
@oddlytimbotwillison6296
@oddlytimbotwillison6296 4 жыл бұрын
Nicely done! I've been very eager for a new input system, the old one was so bad for local co-op games.
@prathameshgaikwad7550
@prathameshgaikwad7550 Жыл бұрын
well if release the button the character stops suddenly, which doesn't seem nice, do you have any idea, how we could smoothly ease in and out between the run, walk and idle.
@mominafaraz9924
@mominafaraz9924 2 жыл бұрын
was a life-saver. Thanks a lot.
@bbtoon
@bbtoon 2 жыл бұрын
thank you man,you are a legend
@eddydoartist
@eddydoartist Жыл бұрын
The issue would it be What version of Unity that can make icon of Input Actions in Assets of the Projects window, I tried many times that failed though I understand that I have installed the Input System Package in my Project settings, help please.
@agarwalpublicintercollege7890
@agarwalpublicintercollege7890 2 жыл бұрын
help to get the basics and I'll jus move from there. Thank you!
@LILTEXAN
@LILTEXAN Жыл бұрын
how do you add camera view to right thumb stick?
@TrueIndian
@TrueIndian 4 жыл бұрын
Quality content!
@zaurkurbanismailov9104
@zaurkurbanismailov9104 2 жыл бұрын
The best!
@JamesLee-lf4fr
@JamesLee-lf4fr 3 жыл бұрын
very good and quality materials, thanks.
@codeFriendlyART
@codeFriendlyART 4 жыл бұрын
Plus+Ultra informative! Love your videos man. I did learned quite a lot from it, as with all of your amazing series! I totally feel the negatives are from pure envy, possibly from other content producers wanting to make the stats to look bad most likely because they are afraid of your steady progress and impressive video quality/content. After all, not many can manage to pull out such a huge amount of high quality content in barely 15 minutes... I'm confident Unity Technologies will get to note your series and approach you. Your videos are simply the best organized, well presented, clear and informative Unity videos out there I've seen so far, period. Hope you're having a nice holiday and keep up the great work man! 🔥💪
@CodeLife_12
@CodeLife_12 2 жыл бұрын
Anyone else has an issue where the character keeps moving if the stick is let go too fast? Like if I slowly bring to stick back to (0,0) the character stops as expectet but if I quickly pull my thumb off, the character keeps walking even if I'm not touching the stick anymore. Does somebody have an idea what could be the issue?
@iHeartGameDev
@iHeartGameDev 2 жыл бұрын
Hey! Try adding the .cancelled callback
@CodeLife_12
@CodeLife_12 2 жыл бұрын
If somebody has the same problem and sees this, I found the solution! I added this bit of code : input.CharacterControls.Movement.canceled += ctx => { currentMovement = Vector2.zero; movementPressed = false; }; If I understood correctly, the issue was that the "canceled" event was called before the (0,0) value was registered and so movementPressed wasn't updated. Updating it here fixes that problem.
@dranora9208
@dranora9208 3 жыл бұрын
Can you explain me how we can block that the character pass through the walls when using an animation with root motion ? :(
@mowalduchiwa1560
@mowalduchiwa1560 3 жыл бұрын
love this channel
@most_likely_sein
@most_likely_sein 3 жыл бұрын
im trying to connect my ps3 controller viva its charer but not working sae for my mobile phone help please, it is detecting the device but the input is not appearing when I try to use the listen button
@siba2893
@siba2893 3 жыл бұрын
This was an amazing tutorial
@juanpablocoloradotuberquia7361
@juanpablocoloradotuberquia7361 3 жыл бұрын
such a good explanation.
@TheShmemek
@TheShmemek 3 жыл бұрын
Hey ! I have an issue with the script, where unity doesn't want to compile the script with this error message : " error CS1061: 'PlayerInput' does not contain a definition for 'CharacterControls' and no accessible extension method 'CharacterControls' accepting a first argument of type 'PlayerInput' could be found (are you missing a using directive or an assembly reference?)" I have double checked every step of the video but nothing has worked for now. The line causing issues seems to be " input.CharacterControls.Movement.performed += ctx => { currentMovement = ctx.ReadValue(); movementPressed = currentMovement.x != 0 || currentMovement.y != 0; }; " Any idea? Great work btw, I learned so much with your videos!
@leandrosalviamarante
@leandrosalviamarante 6 ай бұрын
inside the input action assets, the first thing he does in the video he names it CharacterControls, name it the same
@sammaji9475
@sammaji9475 4 жыл бұрын
Amazing ❤❤❤
@kevinsetiono9933
@kevinsetiono9933 4 жыл бұрын
You explained it very well.
@zmunchiesz
@zmunchiesz 5 ай бұрын
chat everytime i click play my character clips under the plane, any fixes?
@JuanCarlos-cs2qq
@JuanCarlos-cs2qq 2 жыл бұрын
I got error CS1503: Argument 1: cannot convert from 'bool' to 'string', and I don´t know why, I followed the video exactly as he explained
@rehrocks
@rehrocks 4 жыл бұрын
Awesome video congratz
@Billsberry504
@Billsberry504 3 жыл бұрын
What Plugins you got for vs code Im not getting something here.
@iHeartGameDev
@iHeartGameDev 3 жыл бұрын
There’s a full setup process for VSCode! I think there are some video tutorials that will help! Check out SamYam!
@SassyPantsy
@SassyPantsy 3 жыл бұрын
3:40 this might sound like an odd question, but how did you get this screen in the inspector? I've never seen it, and I'm searching for it for ages..
@SassyPantsy
@SassyPantsy 3 жыл бұрын
@@iHeartGameDev well then I must have a problem with my import, cause the transform and rotation settings are missing :( thanks anyway !
@SassyPantsy
@SassyPantsy 3 жыл бұрын
@@iHeartGameDev I did, I think. I mean it's set to humanoid in the inspector. Should it be something else?
@Arab_GameDev
@Arab_GameDev 4 жыл бұрын
thank you bro keep going up
@davidt5347
@davidt5347 3 жыл бұрын
My switch pro controller keeps registering all buttons being pressed at once. Is there a way to fix this?
@holymowmusichd8229
@holymowmusichd8229 Жыл бұрын
Can Armor X Pro used in programming the motion of 3 d characters in unity 3d ?
@NicholasScotti
@NicholasScotti 3 жыл бұрын
is it possible to do a movement like a car, for example, press w, player goes from 0 to speed variable and if you release w go from speed varible to 0 ?(or for the controller stick slow movement = slow speed, full stick movement = full speed) but not via script
How to Move Characters In Unity 3D | Character Controllers Explained
9:46
Unity's NEW input system in 13 minutes
13:02
BiteMe Games
Рет қаралды 32 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
The 5 Stages of Learning Blender
3:14
Artin Azarnejad
Рет қаралды 308 М.
Root Motion Explained (Unity Tutorial)
11:49
Ketra Games
Рет қаралды 76 М.
Why Stairs Suck in Games... and why they don't have to
11:24
Nick Maltbie
Рет қаралды 1,5 МЛН
Unity's New Input System:  The Definitive Guide
32:07
DmanGames
Рет қаралды 35 М.
Everything You Need To Start Making Games (As A Beginner)
16:11
Juniper Dev
Рет қаралды 143 М.
Should You Use Root Motion?
5:23
Birdmask Studio
Рет қаралды 123 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
Make your Characters Interactive! - Animation Rigging in Unity
16:19
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН