How to Move Characters in Unity 3D: Animated Movement Explained [Built-In Character Controller #2]

  Переглядів 157,812

iHeartGameDev

iHeartGameDev

День тому

A breakdown and explanation of how to properly move animated characters in Unity 3D! Learn movement with the Built-In Character Controller and New Input System!
This beginner-friendly tutorial is a COMPLETE walkthrough of how to use Unity 3D's built-in character controller to get a character moving while incorporating animations! In addition, we take the time to break down complicated concepts and understand how it all works!
Small update in 2022: Thanks to Cláudio Costa for pointing out a change in more recent versions of Unity: the "2D Vector Composite Binding" has been renamed to "Up/Down/Left/Right Binding". It is still functionally the exact same though! ✨
ACCESS PROJECT FILES & SUPPORT THE CHANNEL:
💛 / iheartgamedev
iHeartGameDev Merch:
💛 www.iheartgamedev.com
WANT MORE?
Interested in learning more about animating characters in Unity? Check out my growing series of tutorials:
✅ • Unity's Animation System
✦ Like the vid? Please consider Subscribing!
bit.ly/2YdIb6j
✦ Missed out on the last episode?
• How to Move Characters...
SOCIAL:
✦ Discord
/ discord
✦ Twitter
/ iheartgamedev
LINKS FROM THE VIDEO:
🤖 Download Jammo for YOUR game:
assetstore.unity.com/packages...
⭐ And Check Out MixAndJam!
/ mixandjam
🌐 Learn about Quaternions
eater.net/quaternions
GEAR:
Lumix G7 Camera: amzn.to/3Kks1gZ
Epomaker GK68 Keyboard: amzn.to/3Ke87EB
Samson C01U Pro Mic: amzn.to/33kDdtG
LG 27" Monitor: amzn.to/3qAHFwS
Lepow 15.6" Portable Monitor: amzn.to/3287OtL
Logitech G604 Mouse: amzn.to/3A6jNV4
Audio-Technica ATH-M50X Headphones: amzn.to/3tBaeMT
X-Pen Artist 15.6 Pro Drawing Tablet: amzn.to/3FE5HLI
Apple 15in MacBook Pro Laptop: amzn.to/3AbKdFc
►TIMESTAMPS:
Intro: 0:00
Walkthrough Breakdown: 0:40
Download Project Animations: 1:00
Fresh Unity Project: 1:22
Import & Modify Animations: 1:50
Jammo Setup: 3:10
Adding Animator Component & Animation Controller: 3:42
Animation States Setup: 4:22
Animation State Transitions: 4:59
Adding Animations To Animation States: 5:40
New Input System Setup: 6:10
What are Input Actions: 6:24
Action Maps, Actions & Properties: 6:38
Our First Action Map & Action: 7:01
Setting up the Move Action: 7:22
Input Bindings Explained: 8:22
2D Vector Composite Explained: 9:36
Setting up the Run Action: 10:00
IMPORTANT Generate Input Class: 10:25
Are You New to Coding: 10:58
Add a Script to Jammo: 11:17
Accessing our PlayerInput Class: 11:37
Callback Functions Setup & Explained: 12:24
Testing Callback Function: 13:14
Enable & Disable Action Maps: 13:44
Storing & Using the Input Data: 14:23
Adding & Accessing the Character Controller: 15:31
First Movement Code: 16:24
Update Function & Time.deltaTime Explained: 16:39
Setting Up More Input Callbacks: 17:29
Don't Repeat Yourself Movement Refactor: 18:10
Access Animation through Code: 18:55
HandleAnimation Function Setup: 19:30
Learning to Turn with Quaternions: 20:50
HandleRotation Function Setup: 21:20
Quaternion Slerp Explained: 22:27
Run Movement Setup & Code: 23:18
Animator Parameter Hashing Refactor: 25:05
Running Animation Code: 25:31
HandleGravity Function Setup: 26:10
Final Result: 26:56
How to Vote on the Next Tutorial: 27:13

КОМЕНТАРІ: 530
@iHeartGameDev
@iHeartGameDev 2 роки тому
⭐ I'm SUPER excited to share that this project file is available on the brand new iHeartGameDev Patreon! ⭐ Get access and support the future of this channel here: www.patreon.com/iHeartGameDev Thanks so much for watching and I hope this knowledge helps you on your gamedev journey! Cheers! 🍻 -Nicky
@westparezal
@westparezal 2 роки тому
Thx! But how to make it all look professional, smooth and beautiful? Do you have to go to study IK?
@jeronimocollares320
@jeronimocollares320 2 роки тому
About 3rd character controller on web: 800 k where the player ll do dumb things, like walk AND run and... after that, game over...; 1.800.000 bilions where people try convincve "hey, this 2d is nice'; ZERO to: complete system with walk, run, JUMP (need some work, no? Gotcha)... crow... pick up a object - SIT ON CHAIR (minimal to start something descent)...and 100% of IDIOTS telling to us: buy plugins... ...fine... Unity is 'free'... the knollege... dont...pay for it... good job, mate...
@ninjedi6710
@ninjedi6710 Рік тому
@iHeartGameDev, do you happen to have a udemy course on 3rd person knockdown+getting back up?. I would love study on the basic for that. And I would pay for it too if its on udemy.
@Katubug
@Katubug Рік тому
If anyone is having an issue where Visual Studio cannot find the CharacterControls - make sure you hit "Save Asset" in your PlayerInput window. Derp.
@ismailazzouz6256
@ismailazzouz6256 Рік тому
Man how do I do that there's not save button in the playerinput window please help
@bob69927
@bob69927 11 місяців тому
ty
@hanjr5122
@hanjr5122 11 місяців тому
@@bob69927 did u get that?plz help
@tomdriver6733
@tomdriver6733 11 місяців тому
@@hanjr5122 generate C# class in the inspector.
@brianrussell5789
@brianrussell5789 10 місяців тому
You are a life saveR!!!!!
@wett1988
@wett1988 2 роки тому
Thank you so much for this video! In a comprehensive and clear way, you explain things that are not always obvious, and show us almost ready-made modern optimal game functionality with a minimum of code!
@sinananan8451
@sinananan8451 2 роки тому
Your tutorials are consistantly the best I can find on a given topic, I've been struggling to learn the new input system for a few months and you've distilled it brilliantly - keep it up!
@derekablackburn
@derekablackburn Рік тому
This is a fantastic tutorial, you go over everything in just enough depth to understand what you are doing, but not so much so that it goes over a beginners head!
@thesamdogg7
@thesamdogg7 Рік тому
Recently came across your channel. I’ve got to say, this is some of the best content I’ve seen since Brackeys. You are clear, concise, and do an excellent job referencing components. Keep up the great work Nicky!
@2ksp235
@2ksp235 2 роки тому
Simply Awesome there are so many things I am understanding better with your Tutorial. I was coding without really understanding how it works. I simply knew this part does that. Please keep up the good Work I love your tutorials
@TheGamingzombie1
@TheGamingzombie1 2 роки тому
Just found your channel and I am absolutely stunned!! Your content is so amazing and explained in such an amazing way!! Thank you so much for your hard work and being so informative!! You Rock
@fikkitchen
@fikkitchen 2 роки тому
Such a wonderful explanation! A true delight to watch! 😍 Keep up the awesome informative videos and stay amazing, man! 🥳
@d35348w
@d35348w 2 роки тому
Phenomenally clear tutorial. So much nicer than the old system and it's all very intuitive. Thank you.
@tapapriyashaw894
@tapapriyashaw894 Рік тому
Thankyou so so so much!!!! Can't tell you how important this channel has been in learning Unity as a self-taught dev!! Thanks a ton!! Looking forward to next videos...!!!!! :)
@AetherXIV
@AetherXIV 2 роки тому
such high quality content. thank you for all of your work to make things clear
@TheJazzygeoff
@TheJazzygeoff 2 роки тому
Nicky, the quality of your content is off the scale! Outstanding work, well done. I espeically liked the way you popped up a view of something you had previously configured in a little side-window to help remind us how they were associated to what you were doing in the code.
@DhrumitMehta
@DhrumitMehta 2 роки тому
awesome content mann!!!! This is the only channel that I've found so far that explains EVERYTHING in depth! Keep em coming please :))
@eddyrc7
@eddyrc7 2 роки тому
I just found your channel ,this is the most clean way I have ever seen anyone explain animation, thank you !!!! you have a follower for life!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thanks Eddy!
@StaticPlanet
@StaticPlanet 2 роки тому
I fixed it and thanks for such an easy to understand video for a movement control!
@lapinranger7405
@lapinranger7405 2 роки тому
Your tutorials are Realy great ! They seems complete, with all the good tips or last news, clear and nice to watch
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thank you! More coming soon!
@gui31santos
@gui31santos 2 роки тому
Your tutorials and lessons are amazing! Easily the best content around unity I found on UKposts since I started learning game dev
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thank you so much!!
@ProjectCraftyLux
@ProjectCraftyLux 2 роки тому
Up until the Code Part this is the very best, Clearest most concise Tutorial I have ever watched. It would be great if there was a Bolt or play Maker version for 3d character Animators. AWESOME!!!
@thanosbletzhs5941
@thanosbletzhs5941 2 роки тому
Hello! Great tutorial as always! I'm so thankfull for these amazing videos! Since you have covered character control - animation so good, maybe consider creating "enemies" / NPCs with some kind of AI navigation / behavior and / or ragdoll activation! Seriously with all this vast amount of information on the internet, complex topics like the ones you cover can be such a headache for someone like me who is trying to learn, and yet the way you explain things, set goals, have stuff in order....is seriously soothing and helps me and many peope a lot! THANK YOU! Keep up the amazing work!
@mabit
@mabit 2 роки тому
Your tutorials are amazing. Please keep making more
@kentrose2520
@kentrose2520 2 роки тому
Great tutorial series! Just wrapped it up.
@__dane__
@__dane__ 2 роки тому
I would love if you could do a video on the input system and combos. There are definitely some decisions to make as to whether you handle combo logic in the animator state system or in code only.
@asig396
@asig396 2 місяці тому
Thank you very much, the rotation thing was turning me crazy!
@AA-dx4qf
@AA-dx4qf 2 роки тому
Thank you for your time one of the best tutorial on input system and built in controller
@dooshimagames
@dooshimagames Рік тому
Totally love the tutorial really helpful. Thank you🤩
@dmas7749
@dmas7749 11 місяців тому
was looking for a way to handle input system in classes without having to assign any one of them and this is just casually dropped on me, wow. respect
@carnealse
@carnealse 2 роки тому
BluXombie: I have been waiting all week for this. Thank you.
@semi_jared39
@semi_jared39 10 місяців тому
these videos are literally the best on movement in unity.
@default4063
@default4063 Рік тому
Explained very well and understandably. I learned a lot of new things
@vfwarlordforever9589
@vfwarlordforever9589 2 роки тому
This is great! You have the technical explanations of Jason Weinmann with the accessibilty of Brackeys!!! I can use this to improve my Brackeys Third person controller projects!!
@yangya9249
@yangya9249 2 роки тому
Finally, i found a alternative for Brackeys channel. Please keep going! Thank you!
@nelsonthekinger
@nelsonthekinger 5 місяців тому
Fantastic job! Great Tutorial! Appreciated the level of detail!
@ValemVR
@ValemVR 2 роки тому
Amazing tutorial Nicky I love your energy ! The amount of work you put in the editing to help us better understand each concept is crazy thank you so much. 👍
@iHeartGameDev
@iHeartGameDev 2 роки тому
Valem!! Thanks so much mate! The feelings are completely mutual regarding your videos as well! Super inspirational to watch how far your channel has come since I first started watching 😄
@ourybah7633
@ourybah7633 2 роки тому
It was amazing following these tutorials.
@peterschrader2834
@peterschrader2834 2 роки тому
This is such a great guide! Especially if you watched the entire series "Let's Learn Unity!" up to this point. -> It sums up the previous learned things and combines them. Thank you so much for sharing this knowledge with us, even as not native speakers you are perfectly understandable and (with some pauses) easy to follow.
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thanks very much Peter!
@iftikharalam7872
@iftikharalam7872 Рік тому
The best ever explanation of gameDev .. very helpful.
@nguyenhuuphu8371
@nguyenhuuphu8371 2 роки тому
I am struggling in 3D animation, thanks to your videos of your channel have enlighted me so much! Thank you so much.
@iHeartGameDev
@iHeartGameDev 2 роки тому
Amazing! Thank you for watching, Nguyen!! -Nicky
@dasboshitt209
@dasboshitt209 2 роки тому
bruh this guy is underrated af really great tutorials man keep it up
@praveenb-xr
@praveenb-xr Рік тому
The best one i recently watched for input system..Please make some extra videos on same topic
@hummingBirdArtstudio178
@hummingBirdArtstudio178 Місяць тому
I was stuck in all kinds of new input system tutorial and right about to explode, but thanks for uploading this clear demonstration! You are my lifesaver!!!
@iHeartGameDev
@iHeartGameDev Місяць тому
Glad it helped!
@mattnash3437
@mattnash3437 2 роки тому
Just started my main project yesterday as a beginner but have decided to take the time to run through your tutorials, your breakdowns and resource links in combination with Unity are above and beyond whats needed and I'm sure every who watches your channel massively appreciates this, thanks so much for these videos
@DerWiNG33
@DerWiNG33 2 роки тому
I may become a developer because of you, thank you so much with the informative content.
@richseemueller982
@richseemueller982 2 роки тому
Let me first start off and say that I very very rarely leave comments, so the fact that I'm doing so holds extra weight from me. Your channel is the best Unity channel I've found. Your explanation is so clear and concise, yet thorough. You really strike the perfect balance. Things are clicking for me that haven't in other attempts to learn Unity. I hope you keep making videos because I'll sure as hell keep watching them.
@iHeartGameDev
@iHeartGameDev 2 роки тому
Hey thanks so much Rich! Love to hear when things connect for people! More to come from from me in the future, for sure! Cheers 🍻 -Nicky
@firestromgt6491
@firestromgt6491 Рік тому
Your Tutorial Helps Me For My Project Thanks for Those Unity Tutorials Bro!!. Keep it Up bro!!
@samyam
@samyam 2 роки тому
Another great video and editing! 🎉Congrats on the Patreon!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thank you Sam!! :D Super excited to finally have that out there!
@DragonBurn1
@DragonBurn1 2 роки тому
Love this video! Great detail and super clear. What about another video on how you could implement other movement like dashing, sliding, and jumping? Maybe even climbing? Loving the videos though!
@San-wf9rk
@San-wf9rk Рік тому
Always awesome tutorials... Thanks for making
@arooly
@arooly 2 роки тому
Wow, I was so lucky to find your tutorial is excellent. Very professional Thank you.
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thanks for watching!
@ytwithlove
@ytwithlove 2 роки тому
This is perfect! It answers a lot of questions I had about movement, animation, and the input system. If you made a tutorial on how to do combos in melee combat I would be completely set! Thank you do much for making this!
@MiaFaeVODs
@MiaFaeVODs 2 роки тому
Seconded
@manai2683
@manai2683 Рік тому
Wow... this is like a culmination of all your lessons until now
@ishkhanterzian9391
@ishkhanterzian9391 2 роки тому
I never comment on UKposts, but this tutorial was unreal, way to go! Subbed
@iHeartGameDev
@iHeartGameDev 2 роки тому
Awesome, thank you! I really appreciate the kindness!
@moorllk6290
@moorllk6290 2 місяці тому
Really cool lessons, thanks Nicky!
@salvadormilanesbraniff3511
@salvadormilanesbraniff3511 2 роки тому
YES!! So excited!!!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thank you Salvador!!
@aliveoceans
@aliveoceans 2 роки тому
You are making one of the best learning content. Thanks. Could you please also help how to add a TP camera and turn by the camera movement?
@edhalsim
@edhalsim 9 місяців тому
I've watched most of your videos and this is IMO by far your best video yet! Could you use the Mixamo turn left and turn right animations to make turns smoother?
@MiaFaeVODs
@MiaFaeVODs 2 роки тому
Excited already!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thank you Mia!! Hope the video helps you on your gamedev journey!
@AllHailLordMegatron
@AllHailLordMegatron 2 роки тому
This is probably the only channel that has taught me about unity’s animation system, Great tutorial ! I’ll be waiting for the rigid body controller next :)
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thanks so much for watching Alvin!
@kiddynamo66
@kiddynamo66 2 роки тому
Hey man, great video! You have a real talent for delivering very complex tutorials in a very welcoming way. I did just want to report an issue I ran into right near the end. While writing the gravity in you never mention in the video that you add handGravity to the void Update. It just gets added between takes. This is a very obvious step, but as a total newcomer I was stuck here for a while. At least I learned a lot while trying to hunt down the answer!
@dustinproffitt9824
@dustinproffitt9824 2 роки тому
OH MY GOD THANK YOU! I could NOT figure out why that part wasn't working. You're a life savor.
@mayravixx25
@mayravixx25 4 місяці тому
I know I'm two years late but dude seriously, thanks a ton for pointing that out, I got stuck on that part too
@drmeatball124
@drmeatball124 Місяць тому
not sure if it's mentioned elsewhere, I had to change to currentRunMovement.y += gravity; as well 👍
@kingdom216
@kingdom216 2 роки тому
Dude, I figured this one out, but now #3 has got me stumped.
@kyub8417
@kyub8417 2 роки тому
not only your talented your a genius , today I was so amazed and at the same time I'm learning your teaching from hashing, floating gravity written in C# I never have education as you , but today I feel excited to learn that Unity Program ,lucky those students who study comsci ,I never been previllige to have a diploma thanks to yt it gives a broad training ground for all learner just like me btw i'm 50 yrs old still interested this things in digital world. I wish many young Game dev Learn from you I know they're. thankyou for sharing your knowledge if i die at least i know how does this work ! next time I'm excited to see how the gizmo hold weapon and slash.🤖👾stay awesome your excellent teacher in this yt community.👈
@anthonycapron1173
@anthonycapron1173 2 роки тому
thank you very much for this video !! You explain very weel .
@aa-xn5hc
@aa-xn5hc Рік тому
Fantastic tutorial, really great...
@MrEastgalaxy
@MrEastgalaxy 2 роки тому
Dang, your tuts are fiya!
@dylanking165
@dylanking165 2 роки тому
I had to add a y to the last currentRunMovement line in the handleGravity function and also call that in the update function for things to work. Having to figure this out made me feel smart af. void handleGravity() { if (characterController.isGrounded) { float groundedGravity = -.05f; currentMovement.y = groundedGravity; currentRunMovement.y = groundedGravity; } else { float gravity = -9.8f; currentMovement.y += gravity; currentRunMovement.y += gravity; } }
@iHeartGameDev
@iHeartGameDev 2 роки тому
Yep! Totally meant for the code to have that there, but glad you caught it and figured it out! 🙌
@B4NTO
@B4NTO Рік тому
Thanks for an awesome super useful tutorial. I think some stuff was not said in the video but shown in code in the video itself so it took a bit extra time sometime to discover what I was missing but i learnt a lot from your video and im looking into continue on your tutorial videos. Have an amazing day and I look forward to learn more
@antonanton251
@antonanton251 7 місяців тому
Thank u man
@eduardberisha9785
@eduardberisha9785 2 роки тому
you saved my day
@ankurmishra2106
@ankurmishra2106 2 роки тому
Pls Explain shaders in unity. I love your teaching style. I learnt about animations from your videos. Keep it up
@nordon512
@nordon512 2 роки тому
You probably can read minds! This is what i was looking for! Thank you!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Rad! Thanks so much for watching! -Nicky
@rnd172
@rnd172 2 роки тому
this video very helpful to me, thank you so much!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Happy it helped!!
@Joebrain
@Joebrain 2 роки тому
super cool!!
@basilbravo6361
@basilbravo6361 2 роки тому
Awesome Videos, You helped me in unity animation a lot
@iHeartGameDev
@iHeartGameDev 2 роки тому
That's awesome! Thanks for watching!!
@ThyRango
@ThyRango 2 роки тому
great stuff, best i have found for free!!
@N1ghtR1der666
@N1ghtR1der666 2 роки тому
great tutorial series so far, personally I think it would have been better to fully cover all the coding aspects of movement systems before moving to animations but all good
@drmeatball124
@drmeatball124 Місяць тому
For anyone getting a PlayerInput / CharacterControls error around 13:30, make sure you don't have any other existing playerInput.cs from past tutorials in your project. I've been reusing the same project and just making new scenes for each tutorial, archiving all of the crud from the earlier tutorials fixed things.
@ishan9050
@ishan9050 2 роки тому
Your videos have been a huge help to us. Can you do one video tutorial on Skinned Mesh Renderer. Keep sharing. Thanks.
@Elucidator18
@Elucidator18 2 роки тому
Great content!
@themodernpirate2827
@themodernpirate2827 2 роки тому
This channel is about to become the next big thing in Unity
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thank you :D
@mikek9315
@mikek9315 2 роки тому
Great series on the character controller and new Input System. How would one go about changing the Input so Forward on the Joystick and Keyboard is always in the direction the character is facing. So for instance if the character turned left - then left would actually become forward?
@arnaud3184
@arnaud3184 2 роки тому
Great job man!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thank you so much!
@AlexBlackfrost
@AlexBlackfrost 2 роки тому
Great video, as always!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thanks Alex!! Hopefully you learned something new from the video or it clarified some things! Always happy to see you in the comments and appreciate you in the Discord server!
@dasigkatama029
@dasigkatama029 2 роки тому
Thank you
@lgdcompany8151
@lgdcompany8151 2 роки тому
Great video can you cover foot placement using Animation Rigging
@sunburystudios8234
@sunburystudios8234 2 роки тому
Subbed. Thanks for the info!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thank you for watching and subscribing!
@ravz7286
@ravz7286 2 місяці тому
Great tutorial, i recomment to toggle the run button
@odinniereece4096
@odinniereece4096 2 роки тому
This ia a great video with all the coding and stuff.. I'm not that good at coding.. But the end result of this video is motivation to get better. Cant wait to get a character to walk and run in unity🙃
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thanks as always for stopping by the video, Odinnie! I hope it helps you on your gamedev journey!
@nil-gaming
@nil-gaming 2 роки тому
I really really love your videos!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thank you so much!
@jorgealexanderguatequemart3735
@jorgealexanderguatequemart3735 2 роки тому
Muchas gracias !!!
@drukoon1448
@drukoon1448 2 роки тому
It would be great if at the end of the video you can show how the whole finished code looks like. Since I am brand new to c# coding it be a great help to show what my finished code should look like. And give you chance to correct any typing errors you may have typed while doing the video.
@mowalduchiwa1560
@mowalduchiwa1560 2 роки тому
thank you
@signalised9540
@signalised9540 2 роки тому
Amazing video Nicky!
@iHeartGameDev
@iHeartGameDev 2 роки тому
Thank you Sig!! Always appreciate the constant support!
@signalised9540
@signalised9540 2 роки тому
@@iHeartGameDev Ofcourse! Keep up the good work!
@deeprochakravorty
@deeprochakravorty Рік тому
Just a quick tip: While adding a new script through the Inspector window (as a component), you don't have to type 'script' and then type the name of the script. You can just type the name of the script and it will automatically create a script with that name. (11:23)
@Seiku
@Seiku Рік тому
Do you have any tutorials, sources, or recommendations for 2D games and animations instead of 3D? Or perhaps any future plans to do a variation with the input system and controllers with 2D work? I figured its relatively similar and I'm going through the tutorials here and else where to learn more and figure it out. My goal is trying to separate scripts into animation scripts and a custom character controller script to handle movement and collisions, without rigidbodies, that are typical in platformer 2D games. Any info or advice would be great. Great videos by the way, very educational, I'm enjoying watching them all!
@waltermg117
@waltermg117 2 роки тому
awesome!!!!😃
@mr.mustache4743
@mr.mustache4743 2 роки тому
to clean up the hierarchy we could also create another function to call in the update method. we could call this function handle run and then inside of this function we could see if the run has been pressed. is run is pressed we could then multiple the current movement by the run multiplier and time. delta time or if the run isn't pressed then we could just do the regular movement. This way our update area is clean as we are only calling functions from our classes to the method.
@pro-hunter4588
@pro-hunter4588 2 роки тому
thanks
@TheWavve
@TheWavve Рік тому
Thank you for the great tutorial! you're an absolute champ! 🙏🏾 In the handleGravity function else statement, @ 26:54 - you set "currentRunMovement += gravity" without specifying .y, and you don't get an error. Why is this? cheers again!
@user-iv5yq9vj8t
@user-iv5yq9vj8t Рік тому
you are the best!
@goose1946
@goose1946 Рік тому
hey i really found this helpful! great job! one question, how would you adjust the speed of the character in the script?
@iHeartGameDev
@iHeartGameDev Рік тому
Hey thanks! You should be able to just multiply the movement by a multiplier to speed it up. I think that was a part of the section on running!
Сын Расстроился Из-за Новой Стрижки Папы 😂
00:21
Глеб Рандалайнен
Переглядів 4,9 млн
Эффект Карбонаро и пончики
01:01
История одного вокалиста
Переглядів 3,4 млн
Escaping Unity Animator HELL
18:18
Lost Relic Games
Переглядів 488 тис.
How to Move Characters In Unity 3D | Character Controllers Explained
9:46
Camera-Relative Movement in Unity 3D Explained
18:50
iHeartGameDev
Переглядів 41 тис.
Unity's New Input System:  The Definitive Guide
32:07
DmanGames
Переглядів 18 тис.
THIRD PERSON MOVEMENT in 11 MINUTES - Unity Tutorial
11:07
Dave / GameDevelopment
Переглядів 232 тис.
How to Program in Unity: Third Person Movement Explained
11:31
iHeartGameDev
Переглядів 27 тис.