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

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ค. 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 ปีที่แล้ว +129

    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 ปีที่แล้ว +29

    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

  • @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 4 หลายเดือนก่อน

      Saved my ass thank you!

  • @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

  • @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.

  • @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!

  • @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!

  • @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!

  • @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 :)

  • @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!

  • @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!

  • @T8BB
    @T8BB 6 หลายเดือนก่อน +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 TH-cam who literally explain every single detail and information to the viewer.
    THANK YOU A LOT.

    • @iHeartGameDev
      @iHeartGameDev  6 หลายเดือนก่อน

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

  • @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 =)

  • @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! 🎇😎

  • @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 😁😉😁

  • @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

  • @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!

  • @gabrijel9129
    @gabrijel9129 2 ปีที่แล้ว

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

  • @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 😊

  • @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?

  • @greedy_onigiri
    @greedy_onigiri 18 วันที่ผ่านมา

    Wonderful tutorial. Clear, concise, and extremely informative. I've yet to see any tutorial go through such lengths to explain these features. THANK 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!

  • @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 :)

  • @gekcon86
    @gekcon86 4 หลายเดือนก่อน +1

    the Goat at animations tutorials

  • @buysmartter
    @buysmartter ปีที่แล้ว

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

  • @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.

  • @ajmckennan1663
    @ajmckennan1663 3 ปีที่แล้ว +1

    LOVE IT! Well done as usual!!

  • @charlesonis3484
    @charlesonis3484 3 ปีที่แล้ว +1

    Lovin' these tutorials man, so well made!

  • @viktoriiashkurenko2849
    @viktoriiashkurenko2849 3 ปีที่แล้ว

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

  • @derbabonennt8876
    @derbabonennt8876 3 ปีที่แล้ว +28

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

  • @chamudpathirana
    @chamudpathirana 3 ปีที่แล้ว

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

  • @alexjackson3767
    @alexjackson3767 3 ปีที่แล้ว +1

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

  • @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

  • @victor1102
    @victor1102 2 ปีที่แล้ว +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  2 ปีที่แล้ว

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

  • @hypetrain7134
    @hypetrain7134 3 ปีที่แล้ว

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

  • @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.

  • @MarcGrosset-nk8kl
    @MarcGrosset-nk8kl 5 หลายเดือนก่อน

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

  • @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.

  • @inorishu1877
    @inorishu1877 3 ปีที่แล้ว

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

  • @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!

  • @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!

  • @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!

  • @MrKiraBR
    @MrKiraBR 3 ปีที่แล้ว

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

  • @murrischcat9098
    @murrischcat9098 2 ปีที่แล้ว

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

  • @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!

  • @Skiss2.0
    @Skiss2.0 2 ชั่วโมงที่ผ่านมา

    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!!!

  • @tahaelaradi5539
    @tahaelaradi5539 3 ปีที่แล้ว

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

  • @vaibhavshukla7769
    @vaibhavshukla7769 3 ปีที่แล้ว

    Best tutorial clean, easy and on point

  • @Random_Guy420
    @Random_Guy420 ปีที่แล้ว

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

  • @feragon42
    @feragon42 3 ปีที่แล้ว

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

  • @TNTCProject
    @TNTCProject 3 ปีที่แล้ว +4

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

  • @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!!

  • @wika96
    @wika96 2 ปีที่แล้ว

    You did a really great job. Superb tutorial series

  • @duelator2813
    @duelator2813 2 ปีที่แล้ว

    This really helped me out tons! Thanks Nick :)

  • @hydroweapon
    @hydroweapon 3 ปีที่แล้ว

    These videos are exactly what I was looking for

  • @akashjaiswar9437
    @akashjaiswar9437 3 ปีที่แล้ว

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

  • @LuRybz
    @LuRybz 3 ปีที่แล้ว

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

  • @johnstrunk226
    @johnstrunk226 3 ปีที่แล้ว

    Awesome tutorial, thanks for making it so well!

  • @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.

  • @iboxgaming9418
    @iboxgaming9418 2 ปีที่แล้ว

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

  • @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.

  • @rikrishshrestha5421
    @rikrishshrestha5421 3 ปีที่แล้ว

    Fantastic videos , clearly understandable . Thank you !

  • @yoyopei3793
    @yoyopei3793 2 หลายเดือนก่อน

    So helpful even after 3 years! Thank you

  • @mostyndarko
    @mostyndarko 3 ปีที่แล้ว

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

  • @ved7108
    @ved7108 3 ปีที่แล้ว +1

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

  • @vobissunt
    @vobissunt 3 ปีที่แล้ว

    Genuinely excellent tutorials.

  • @shsstudios5292
    @shsstudios5292 ปีที่แล้ว

    Amazing explanation, please keep going!

  • @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

  • @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!

  • @orozcoapaza1660
    @orozcoapaza1660 2 ปีที่แล้ว

    Thanks for creatiing such amazing tutorials...

  • @tndev6060
    @tndev6060 3 ปีที่แล้ว

    Excellent tutorial mate❤

  • @brunopastor9508
    @brunopastor9508 2 ปีที่แล้ว +1

    Really good content man thanks a lot!!

  • @jonathansmith114
    @jonathansmith114 3 ปีที่แล้ว

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

  • @jdiosilvaf
    @jdiosilvaf 3 ปีที่แล้ว +1

    Just AMAZING!!! Ty for that class :D

  • @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.

  • @9carlo6
    @9carlo6 3 ปีที่แล้ว

    You did a great job!! Thank you!

  • @Kingdlee_
    @Kingdlee_ 3 ปีที่แล้ว

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

  • @JimmyDeLock
    @JimmyDeLock 3 ปีที่แล้ว +1

    Such a great video, thanks a bunch man!

    • @iHeartGameDev
      @iHeartGameDev  3 ปีที่แล้ว

      Thanks again for watching Nathan!

  • @sulwyn8003
    @sulwyn8003 3 ปีที่แล้ว +1

    good stuff! very good audio

  • @elmundodeFreeman
    @elmundodeFreeman 3 ปีที่แล้ว

    Everything you do is magic.

  • @sansavatar5929
    @sansavatar5929 9 หลายเดือนก่อน +1

    Thanks Nicky this is truly a good quality content

    • @iHeartGameDev
      @iHeartGameDev  9 หลายเดือนก่อน

      thank you for watching!

  • @user-cp9vf9io8n
    @user-cp9vf9io8n 5 หลายเดือนก่อน +1

    Really Amazing video, helped me a lot♥

  • @lycagos1278
    @lycagos1278 2 ปีที่แล้ว

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

  • @devintunc3782
    @devintunc3782 3 ปีที่แล้ว

    whole your tutorials are great!

  • @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.

  • @XRelabs
    @XRelabs ปีที่แล้ว

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

  • @imc0der
    @imc0der 9 หลายเดือนก่อน +1

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

    • @iHeartGameDev
      @iHeartGameDev  9 หลายเดือนก่อน

      So nice of you! Thank you!

  • @alex.artechtattoo
    @alex.artechtattoo ปีที่แล้ว

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

  • @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

  • @diliupg
    @diliupg 3 ปีที่แล้ว

    Excellent tutorials!

  • @phelipepalte
    @phelipepalte 3 ปีที่แล้ว

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

  • @mowalduchiwa1560
    @mowalduchiwa1560 2 ปีที่แล้ว

    one of the best thank you

  • @Admixplay
    @Admixplay 3 ปีที่แล้ว

    Very easy to follow video! Subbed