How to Animate Characters in Unity 3D | Two Dimensional Blend Trees Explained

Поділитися
Вставка
  • Опубліковано 30 лип 2024
  • Learn how to animate characters in Unity 3D with dynamic animations from blend trees!
    This beginner-friendly tutorial is a complete walkthrough of two dimensional blend trees and how we can use blend trees to create new animations for our characters using two float parameters!
    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
    SERIES DESCRIPTION:
    This is the fifth video in a series dedicated to understanding the fundamentals of Unity's animation system. Episode 0 was an introduction to the project and explains how to import free characters and animations from Adobe Mixamo. Episode 1 was a full break down of the Animator Component. And episode 2 explained how we can use booleans to give players control of animations! And episode 3 covered covered one dimensional blend trees! Today we blend trees to the next level 🤘 Be sure to check out the other videos in the series to continue learning!
    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
    Catch Up - 0:30
    Mixamo.com - 0:57
    Mixamo Export Settings - 1:23
    Setup In Unity - 1:43
    New Blend Tree - 2:00
    Adjust Parameters - 2:20
    All Blend Tree Types - 2:42
    Difference in Blend Trees - 3:04
    2D Simple Directional - 3:12
    Add Motions - 3:28
    Motions Graph Explained - 3:35
    Set Motion Animations - 3:58
    Set Motion Positions - 4:23
    Motion Node Explained - 5:18
    Testing Simple Directional - 5:57
    Fixing Current Problems - 6:27
    Freeform Directional - 6:30
    Simple Directional Explained - 6:45
    Simple Directional Proper Example - 8:00
    Switch To FreeForm Directional - 8:13
    Freeform Cartesian - 8:26
    2D Blend Tree Comparison - 8:37
    Freeform Cartesian Example - 9:21
    Direct - 9:28
    Why Freeform Directional - 9:46
    Control to the players - 10:00
    New Script - 10:23
    Set Animator - 10:42
    Set Velocity X and Z - 11:06
    Start to Get Player Input - 11:17
    Modify Velocity - 11:44
    Add Acceleration And Deceleration - 12:07
    StrafeCode - 12:28
    Set Parameters - 13:13
    Needed Improvements - 13:45
    Max and Min Velocities - 14:02
    Implement Deceleration - 14:32
    Implement Reset of Velocity - 15:30
    Handle Running - 16:07
    Declare Max Walk/Run Velocity - 16:30
    Set Current Max Velocity - 16:50
    Learn Ternary Operators - 17:01
    Replace conditions with currentMaxVelocity - 17:22
    Creating Caps and Locks for Forward VelocityZ - 17:50
    Replicating For Strafing Velocity X - 19:30
    Refactoring Code - 20:05
    Parameter Hashes - 20:22
    Replace Keycodes - 20:45
    Separate Code in Update Function to Two Functions - 20:55
    End Result - 21:59
    Outro/NextTime - 22:10
    Thank you - 22:26
    #indiegame #gamedev #indiedev #2020
    If you are reading this, say hi :]
    Thank you for watching!

КОМЕНТАРІ • 408

  • @ronnid8837
    @ronnid8837 3 роки тому +130

    Watched the whole series and it is really well explained!
    Probably one of the best unity tutorials and always straight on point.
    Subscribed =)

    • @ashtonquincy3800
      @ashtonquincy3800 3 роки тому

      i guess I'm kind of off topic but does anyone know of a good website to watch new movies online?

    • @kaydenkorbin225
      @kaydenkorbin225 3 роки тому

      @Kenzo Misael definitely, have been using Flixzone for since april myself :D

    • @ashtonquincy3800
      @ashtonquincy3800 3 роки тому

      @Kenzo Misael Thank you, I went there and it seems like a nice service =) I appreciate it !

    • @kenzomisael8259
      @kenzomisael8259 3 роки тому

      @Ashton Quincy you are welcome =)

    • @MrCat-hx4sk
      @MrCat-hx4sk 2 роки тому

      Completely agree

  • @kulak8548
    @kulak8548 3 роки тому +34

    The fact you timestamped every little piece of this video shows next-level dedication to making the information accessible.

    • @iHeartGameDev
      @iHeartGameDev  3 роки тому +7

      Thank you Kulak! Happy to hear it’s worth the time investment!

  • @sinify6676
    @sinify6676 3 роки тому +53

    If making tutorials is something you enjoy, I beg you to keep going. You have the 'x' factor for it (i.e. voice, cadence, attention to detail, etc.)--see the rate of people saying likewise in the other comments. This series is exceptionally done. For me, the main detail that I have enjoyed is how you explain EVERY menu-item found in the unity UI when covering the topic. It is extremely common to see tutorials that: only cover a very primitive overview of what they are implementing, never explain how their 'solution' scales to other implementations, never touch on the details of other features, never explain why you would use their idea (vs. some other concept), etc.
    Based on that, I think it is essentially guaranteed that you can grow your channel to an arbitrary amount of subscribers/likes/views. I would not be surprised to check back later and see you have 100k+ subs.
    Best of luck, and again, well done.

  • @barelycertain
    @barelycertain 3 роки тому +31

    If you're having trouble making the animations blend and play correctly make sure you have the animations looped as he explained in previous videos. He didn't explain it this time and I had trouble figuring out what I was doing wrong.

    • @rwinftw
      @rwinftw 3 роки тому +4

      I had the animations looped but my character waits to walk then it blends after that wait

    • @GuruguyGaming
      @GuruguyGaming 3 роки тому +3

      Comments section is a lifesaver sometimes lol, thnx fam!

    • @goobler7191
      @goobler7191 2 роки тому +3

      @@rwinftw disable exit time

    • @AnimateIt2BauBau
      @AnimateIt2BauBau Рік тому

      Thanks you're really awesome

  • @codeFriendlyART
    @codeFriendlyART 3 роки тому

    Great series! Getting to understand a few things I had doubts about regarding the 2D Blendtrees definitions! Love the pace on this last ones as well. Loving that you're taking the time to work some refactoring at the end while keeping the main development as simple as possible! Just great job! 🎇😎

  • @harrangkhalsa7408
    @harrangkhalsa7408 3 роки тому +17

    Dude this is one of the best tutorials I've ever seen I've been looking for something like this for so long. Thank you for this so much

  • @danielweber4961
    @danielweber4961 3 роки тому

    Great tutorial! I love how well separated and organized it is, on the video player and on the side bar.

  • @aldigangster123
    @aldigangster123 3 роки тому +3

    Outstanding quality! Instant sub. I like how much effort you put into the explanation! And even timecodes, wow. Please keep making Unity tutorials like these :)

  • @ericbramble5043
    @ericbramble5043 3 роки тому

    Here you are almost a year later and your videos are still helping aspiring game devs learn essential concepts to create. Thanks for what you do man!

  • @newgoogleaccount3526
    @newgoogleaccount3526 3 роки тому +5

    I love the fact that you cover almost every aspect of Unity's UI which helps to learn more about the topic and develop better game. Nice background music, this is how all tutorials on the internet should be.

  • @gabrijel9129
    @gabrijel9129 2 роки тому

    Honestly, a really well done tutorial series that gets me excited to learn more! You're doing great!

  • @kevinmitchell6775
    @kevinmitchell6775 3 роки тому +3

    Bruh, I've been looking for a tutorial series that actually explains what's happening and not just how to accomplish something! Great job!

  • @MrRevelance
    @MrRevelance 3 роки тому

    I didnt even notice there was an ad at the beginning of the video because you make us so excited to see the tutorial asap. Wonderful work!

  • @wett1988
    @wett1988 3 роки тому +2

    Great explanation of this complex mechanics, thank you so much for your work!
    I didn't even know how to approach the animation process before, but now I will definitely try!

  • @PersonalAccountIndeed
    @PersonalAccountIndeed 2 роки тому

    You are absolutely the king of Unity animation tutorials, these go so in-depth and are explained really well. I'm glad I found this!

  • @SassyPantsy
    @SassyPantsy 3 роки тому +3

    Honestly, after 7 months of learning gameDev by myself, finding your channel is like taking a breath of much needed air. Everything's explained instead of just being written down, including the glitches, so we could learn what makes them happen, and what should be taken into consideration. Way better tutorials than everyone else, including brackey's and the other big names. I sincerely hope you continue with this!

  • @weimaychen4346
    @weimaychen4346 3 роки тому +2

    Really amazing tutorials you have! Clear and easy to follow, very well planned! Would love to see a similar tutorial for creating NPC character animations :)

  • @divergentunity5020
    @divergentunity5020 3 роки тому

    You have a natural gift for teaching and breaking thing's down to bite size chucks. Great work on all your video's. Thanks for making them available for everyone to watch.

  • @stephenq24
    @stephenq24 3 роки тому

    I think this was an amazing video because you not only showed HOW to do something; but, you explained the WHY behind everything that was done. Good job and keep making videos please.

  • @018FLP
    @018FLP 3 роки тому

    Oh man, as a beginnerDev, i'm really really proud of using the same logic as you before seeing this video, really got me in a "yaaah, i'm in the right path!" mood. Your refactoring is amazing, btw. It's a thing nobody covers, so your tutorials are complete, not that "do this, do that", and i appreciate it so much. Thank you! Keep up the good work

  • @foofitz7661
    @foofitz7661 3 роки тому +2

    Nice work Nicky! I'm from Brazil and just want you to know that even for people that don't understand to much about coding, you make a lot easier! Thanks for doing this =)

  • @kunalbhayana
    @kunalbhayana 3 роки тому +7

    As always
    Concise and brilliant explanation!
    I love these timestamps that you add.
    Can't Thank you Enough!
    Definitely Gonnna hit the notification bell.

    • @fishy_96
      @fishy_96 3 роки тому +1

      @@iHeartGameDev Bro You are The best. Can you also please add tutorials on another subjects that'll be really helpful 😁😉😁

  • @viktoriiashkurenko2849
    @viktoriiashkurenko2849 3 роки тому

    Amasing videos (as always)!! Can't wait for the next ones! Really interested in animation based events

  • @chamudpathirana
    @chamudpathirana 3 роки тому

    These videos are really great man. Appreciate a lot. Please keep making more tutorials!! Looking forward to learn more from you.

  • @Herdetzy
    @Herdetzy 3 роки тому +1

    Great content! I have been working with this and it is the best mixamo and animation videos out there. Very easy step by step and it is keeping me motivated!

  • @ahmetomercicek5848
    @ahmetomercicek5848 2 роки тому

    Thank you for making the complex process simple and understandable. I would love to see more educational content for unity from you.

  • @buysmartter
    @buysmartter Рік тому

    I am learning tons of new stuff I didn't know. Thanks! the whole series is great!

  • @annoyingpigeon2688
    @annoyingpigeon2688 3 роки тому +26

    If anyone is having issues with the animations, make sure they are set to loop and exit time has been disabled on the transitions into the blend tree

    • @angelkaki5707
      @angelkaki5707 9 місяців тому

      all the animations?? or just the idle, walk and run?? coz now that i added the code my left input its not working as long with the left shift run

    • @user-uw3cd8hb2g
      @user-uw3cd8hb2g 5 місяців тому

      Saved my ass thank you!

  • @chrisdewitt1598
    @chrisdewitt1598 2 роки тому

    Nicky, this is an outstanding series. As an educator myself I really appreciate your level of detail in explaining all of the different options so people can make use of those in the future. What might help though, is a video on what to do if something goes wrong. Maybe a "how to troubleshoot" animation problems video. Speaking from experience, I go through these step-by-step and my results don't always work out. Then it is really difficult being new to the content to figure out what happened. Sometimes the comments section provides a solution, but not always.

  • @alexjackson3767
    @alexjackson3767 3 роки тому +1

    This is awesome :) love the clear explanations, as always

  • @charlesonis3484
    @charlesonis3484 3 роки тому +1

    Lovin' these tutorials man, so well made!

  • @mr.dingleberry4882
    @mr.dingleberry4882 3 роки тому

    Top-notch quality right here people! Very thorough and insightful explanation, hard to believe we are getting it for free.

  • @DennisGJerzSHU
    @DennisGJerzSHU 3 роки тому

    Yes, this series is teaching me just what I needed to know. I've subscribed.

  • @acewinge2302
    @acewinge2302 3 роки тому

    mate you are one of the best out there in terms of tutorial. Your channel will definitely blow up.

  • @monkeyrobotsinc.9875
    @monkeyrobotsinc.9875 3 роки тому

    you are a great instructor. and your explanations are PERFECT. thank you so much for all of these videos. youre the best!

  • @derbabonennt8876
    @derbabonennt8876 3 роки тому +28

    your tutorials are one of the best - pretty clean and relativly short.

  • @MrKiraBR
    @MrKiraBR 3 роки тому

    Dude your explanations are outstanding. Thank you so much for sharing such an awesome and important content!!!

  • @akshay_gyaan
    @akshay_gyaan 3 роки тому +1

    I really like that he doesn't treat us as "beginners". Great tutorials for intermediate to advanced level learners!

  • @tahaelaradi5539
    @tahaelaradi5539 3 роки тому

    Great learning resource in the making. Keep it up and best of luck!

  • @LuRybz
    @LuRybz 3 роки тому

    This is actually really useful content.
    Found you from reddit. Thanks for sharing

  • @ajmckennan1663
    @ajmckennan1663 3 роки тому +1

    LOVE IT! Well done as usual!!

  • @greedy_onigiri
    @greedy_onigiri Місяць тому

    Wonderful tutorial. Clear, concise, and extremely informative. I've yet to see any tutorial go through such lengths to explain these features. THANK YOU!!

  • @inorishu1877
    @inorishu1877 3 роки тому

    One be the most organized tutorial series....i would love to see more

  • @ljoraanstad
    @ljoraanstad 2 роки тому +3

    this is an absolutely brilliant video/series. You cover topics and complex features super well. I really appreciate this and look forward to putting it into my own game. Highly recommend this.

    • @iHeartGameDev
      @iHeartGameDev  2 роки тому

      Hey Levi! Thanks so much! I’d recommend actually checking out some of my newer tutorials too! I’ve learned a lot since this tutorial was released and hopefully you can learn it too!

    • @alexthompson8977
      @alexthompson8977 2 роки тому

      @@iHeartGameDev I'm new to unity and all the animated running works but my character isn't working. I'm using unities in built animation system as well as simple cubes for the character so does it need to be a proper rigged character or am I doing something wrong?

  • @miguelsandoval6800
    @miguelsandoval6800 3 роки тому +23

    Straight on point, explaining everything even when its not used, what more can I ask for?
    Oh, wait, I know... More videos! :D

  • @Random_Guy420
    @Random_Guy420 Рік тому

    Bro your video are so well edited and jam pack with useful infos that a beginner need to understand.

  • @T8BB
    @T8BB 7 місяців тому +3

    even tho i didnt understand the tutorial clearly due to my limit of english language and my knowledge in coding and using unity, i subscribed and joined the membership because of how detailed your explaining was, it is really hard to find people like you in UA-cam who literally explain every single detail and information to the viewer.
    THANK YOU A LOT.

    • @iHeartGameDev
      @iHeartGameDev  7 місяців тому

      Hey! Thank you so much for the support! I hope the content on my channel is able to help you on your gamedev journey!!

  • @zubariaayub5150
    @zubariaayub5150 Рік тому

    This is a very helpful series, walking us through every step in plenty of detail. Highly appreciated. Liked & Subscribed. :D
    A small recommendation, please start the video off with what we will achieve at the very end as a point of reference, in case somebody wants to try on their own along the way.

  • @mostyndarko
    @mostyndarko 3 роки тому

    Your tutorial vids are awesome btw. Keep up the good work! ;)

  • @MarcGrosset-nk8kl
    @MarcGrosset-nk8kl 5 місяців тому

    Wow, congrats ! clear, cool, complete. Really an awesome tutorial

  • @feragon42
    @feragon42 3 роки тому

    This was intimidating at first, but you helped me throught this. Great videos!

  • @michaelderosier3505
    @michaelderosier3505 2 роки тому +3

    This is a "Must Watch Tutorial Series" for any beginner using Unity Animation Tools. If you watch his entire series for Unity Animation you will be far better off in the long run. Thank you soooo much for this upload !HeartGameDev.

    • @iHeartGameDev
      @iHeartGameDev  2 роки тому

      Thank you for watching! I think my newer videos are even better 😊

  • @anaibrahim4361
    @anaibrahim4361 3 роки тому +1

    not just learned about unity animation system but i also learned how to write clean code
    perfect
    this is what i call pure gold thanks a lot bro

    • @iHeartGameDev
      @iHeartGameDev  3 роки тому

      Thanks so much for the kindness Ana! Really happy to have helped you learn!

  • @victor1102
    @victor1102 3 роки тому +1

    Your reminder at 12:53 is very much appreciated! Often time for beginner like myself this is often overlooked when overwhelmed by the code.

    • @iHeartGameDev
      @iHeartGameDev  3 роки тому

      Amazing! Thank you! I love to hear that :D

  • @TNTCProject
    @TNTCProject 3 роки тому +4

    Good Job Nicky!
    Your explanations are always clear and precise
    Super happy to see that your channel is growing :)
    - Erik

  • @hypetrain7134
    @hypetrain7134 3 роки тому

    Yes!! I’ve been waiting for this!!

  • @akashjaiswar9437
    @akashjaiswar9437 3 роки тому

    These are very useful and well explained. Thank you for this videos.

  • @bentom945
    @bentom945 3 роки тому

    Now I understand about these 2D options, better than Unity documentation itself LoL. Thanks for your great tutorials, excellent explanation. Your videos can be masterpiece soon. Can’t wait for new videos.

  • @duelator2813
    @duelator2813 2 роки тому

    This really helped me out tons! Thanks Nick :)

  • @gekcon86
    @gekcon86 5 місяців тому +1

    the Goat at animations tutorials

  • @johnstrunk226
    @johnstrunk226 3 роки тому

    Awesome tutorial, thanks for making it so well!

  • @Kingdlee_
    @Kingdlee_ 3 роки тому

    You have a wonderful channel compared to other unity users! Great work 👏🏾

  • @IrfanAli-so5hh
    @IrfanAli-so5hh 3 роки тому +1

    Great Series Man !
    It will be helpful for if u put a episode number in each episode's thumbnail of the series.
    Otherwise we always want to check the playlist to get to know which video we wanna see next when we have finished an episode.

  • @wika96
    @wika96 2 роки тому

    You did a really great job. Superb tutorial series

  • @Skiss2.0
    @Skiss2.0 14 днів тому

    Hi, thank you so much for this tutorials, english isnt my native language but you managed to clearify information even for someone like me, highly appreciate your hardwork, keep going!!!

  • @harshparihar9857
    @harshparihar9857 3 роки тому +1

    I love the way you explained blend tree and I really understand very well thanku so much ❤️❤️

    • @iHeartGameDev
      @iHeartGameDev  3 роки тому

      Thank you for watching and the kind words!!

  • @rikrishshrestha5421
    @rikrishshrestha5421 3 роки тому

    Fantastic videos , clearly understandable . Thank you !

  • @hydroweapon
    @hydroweapon 3 роки тому

    These videos are exactly what I was looking for

  • @murrischcat9098
    @murrischcat9098 2 роки тому

    What a journey!!! Amazing work!!! 👏

  • @hyperdz415
    @hyperdz415 Рік тому

    i give up while seen all this variables xD your coding completely amazing and pro
    so i decide to do it with myself
    it works too

  • @vaibhavshukla7769
    @vaibhavshukla7769 3 роки тому

    Best tutorial clean, easy and on point

  • @ved7108
    @ved7108 3 роки тому +1

    this is the best tutorial series on the internet(including paid ones)

  • @jonathansmith114
    @jonathansmith114 3 роки тому

    Thank you so much for the videos. It is such a great help.

  • @captainvaughn5692
    @captainvaughn5692 4 місяці тому

    Damn all this time learning unity felt like i was just copying someone elses work, and to be honest it was just that, simply because every explanation didn't actually learn me to develop features myself. This is probably the first video that not only taught me something, but gave me ideas on how to implement stuff myself. I'm now thinking about making a blend tree system that merges different aim animations through camera rotation. Man, thank you. For real. You are amazing!

    • @iHeartGameDev
      @iHeartGameDev  4 місяці тому +1

      I know this video is years old, but I still go through and read all of my comments. I love these types of comments because they really hit home that the direction of quality vs quantity on this channel was the right approach. Thank you for taking the time to write it.

    • @captainvaughn5692
      @captainvaughn5692 4 місяці тому

      @@iHeartGameDev I'm currently going over your state machine videos, and altough i don't understand everything yet, i think its important to learn about more abstract concepts in programming as well, and learning about OOP concepts like inheritance, polymorphism and so on is really cool. You really explain things well, i'm very thankful for your work!

  • @iboxgaming9418
    @iboxgaming9418 2 роки тому

    You are the best man!! the best tutorial I have ever seen

  • @phelipepalte
    @phelipepalte 3 роки тому

    Nice tutorial, Bro! I really thankful to you for all dedication and nice content. Waiting for new videos :)

  • @thygrrr
    @thygrrr 3 роки тому +1

    Excellent tutorial. Easily S tier among all the tutorial makers.
    The coding stuff is standard fare - but the refactoring part at the end is absolute diamond level good.

    • @iHeartGameDev
      @iHeartGameDev  3 роки тому +1

      Thank you so much! I hope the rest of my videos meet the same quality!

  • @XRelabs
    @XRelabs Рік тому

    You are amazing, the details the video edit the method the way you teach its all perfect thank you very much 🌹🙏👍🏻

  • @yoyopei3793
    @yoyopei3793 2 місяці тому

    So helpful even after 3 years! Thank you

  • @shsstudios5292
    @shsstudios5292 Рік тому

    Amazing explanation, please keep going!

  • @alex.artechtattoo
    @alex.artechtattoo Рік тому

    Thanks a lot for such great content, mate! Definitely SUB!

  • @tndev6060
    @tndev6060 3 роки тому

    Excellent tutorial mate❤

  • @vobissunt
    @vobissunt 3 роки тому

    Genuinely excellent tutorials.

  • @brunopastor9508
    @brunopastor9508 2 роки тому +1

    Really good content man thanks a lot!!

  • @orozcoapaza1660
    @orozcoapaza1660 2 роки тому

    Thanks for creatiing such amazing tutorials...

  • @jdiosilvaf
    @jdiosilvaf 3 роки тому +1

    Just AMAZING!!! Ty for that class :D

  • @nucleartide
    @nucleartide 2 роки тому +1

    Thanks for creating this tutorial series, I'm learning loads about how Unity animation works!
    One note on the acceleration + deceleration: it'd be cleaner to use Mathf.SmoothDamp, or even Vector3.SmoothDamp to damp between desired values.
    Here's what my implementation ended up as:
    void Update()
    {
    // Grab inputs.
    var w = Input.GetKey(KeyCode.W);
    var a = Input.GetKey(KeyCode.A);
    var d = Input.GetKey(KeyCode.D);
    var leftShift = Input.GetKey(KeyCode.LeftShift);
    // Compute desired Z.
    var desiredZ = 0f;
    if (w && leftShift)
    desiredZ = walkSpeed;
    else if (w && !leftShift)
    desiredZ = runSpeed;
    // Update Z.
    velocityZ = Mathf.SmoothDamp(velocityZ, desiredZ, ref smoothDampForVelocityZ, smoothTime);
    // Compute desired X.
    var desiredX = 0f;
    if (a)
    desiredX -= 1f;
    if (d)
    desiredX += 1f;
    desiredX *= leftShift ? runSpeed : walkSpeed;
    // Update X.
    velocityX = Mathf.SmoothDamp(velocityX, desiredX, ref smoothDampForVelocityX, smoothTime);
    // Update animator.
    animator.SetFloat(velocityXHash, velocityX);
    animator.SetFloat(velocityZHash, velocityZ);
    }
    An additional improvement would be to use Vector3.SmoothDamp as mentioned earlier. Also, the input vector should be normalized so the player's diagonal movement is equal to cardinal movement.

  • @9carlo6
    @9carlo6 3 роки тому

    You did a great job!! Thank you!

  • @lycagos1278
    @lycagos1278 2 роки тому

    what did i jusr saw???? god damn, the most glorious tutorial in the internet!!!!!!!
    i subscribe immediately

  • @DullaghanCormac
    @DullaghanCormac 3 роки тому

    Excellent tutorials after watching your entire series to date. Thank you! Other tutorials (including paid) for Unity only told me to do things, but didn't explain why or what the difference between was. I really appreciate the time you take to do this. I also learnt something entirely new with the ? Variable1:Variable2 code. Never saw that before. Always used if statements. Really looking forward to the next part as that's what I'm must stuck on currently. When's it coming out please? :)

    • @DullaghanCormac
      @DullaghanCormac 3 роки тому

      @@iHeartGameDev That's great to hear! Waiting with bated breath! :D Thanks again!

  • @imc0der
    @imc0der 10 місяців тому +1

    Thanks for video. Bro your oratory awesome and explanation is simple and descriptive

  • @devintunc3782
    @devintunc3782 3 роки тому

    whole your tutorials are great!

  • @JimmyDeLock
    @JimmyDeLock 3 роки тому +1

    Such a great video, thanks a bunch man!

  • @ironheavenz
    @ironheavenz 2 роки тому +4

    Thanks a lot for this series, I have been struggling to correctly understand animations and this is a lifesaver
    Really concise and straight to the point tutorials, each one self-contained yet better paired together, I ended up following the entire series to make sure I didn't miss anything and ended up learning really useful details on top on what I already knew and I also didn't feel bored or overwhelmed
    Each one of your tutorials is god tier quality and really thorough, not just being a "follow along" but also allowing me to get a deeper understanding of what we're doing in a simple way
    This is just amazing

  • @elmundodeFreeman
    @elmundodeFreeman 3 роки тому

    Everything you do is magic.

  • @MarcGrosset-nk8kl
    @MarcGrosset-nk8kl 5 місяців тому

    No doubt, Nikky should be awarded. Subscription is a duty^^

  • @chrisa9549
    @chrisa9549 3 роки тому

    wow, Amazing tutorial man, you can tell how much work you put into them. guarenteed with this kind of quality your subs are gunna go up fast haha :D Can you make a tutorial on holding a gun, or item, maybe being able to point it around (is a seperate animation necessary? :o)

    • @chrisa9549
      @chrisa9549 3 роки тому

      @@iHeartGameDev totally worth the wait, :D just subbed!

  • @ironheavenz
    @ironheavenz 2 роки тому +1

    For anyone who's forward animations are working but the strafing ones are not unless you press forward first:
    Make sure that the blend tree is your default animation
    If you want to have another one as your default animation, make sure you make one transition that checks if velocityZ is greater than 0 and a sepparate one that checks if velocityX is greater than 0

  • @user-cp9vf9io8n
    @user-cp9vf9io8n 5 місяців тому +1

    Really Amazing video, helped me a lot♥

  • @unbotheredwaffle
    @unbotheredwaffle 3 роки тому

    I did it alone! LET'S GOO! Took me a bit but it's actually pretty intuitive.