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.
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.
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.
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!
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.
@@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!
Wonderful tutorial. Clear, concise, and extremely informative. I've yet to see any tutorial go through such lengths to explain these features. THANK YOU!!
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.
Thank you for the video! For anyone wanting a shorter way, this is what I've done: Vector2 inputVelocity; -------> Using Input System (new) I get a Vector2 instead of a single float from the Input Manager (old) Vector2 currentVelocity; -------> As I get a Vector2, instead of storing inputs in single floats, I use a single Vector2 float maxVelocityX; -------> Max allowed velocity in X float maxVelocityY; -------> Max allowed velocity in Y (Z axis in the video) private void Update() { LateralMovement(); ForwardMovement(); animator.SetFloat(VelocityYHashCode, currentVelocity.y); animator.SetFloat(VelocityXHashCode, currentVelocity.x); } private void LateralMovement() { maxVelocityX = runPressed ? maxRunVelocity : maxWalkVelocity; maxVelocityX *= MathF.Sign(inputVelocity.x); -------> be sure to use MathF (capital F) instad of Mathf, the later is a Unity library and behaves differently from MathF (c# library) currentVelocity.x = Mathf.MoveTowards(currentVelocity.x, maxVelocityX, Time.deltaTime * changeRate); } private void ForwardMovement() { maxVelocityY = runPressed ? maxRunVelocity : maxWalkVelocity; maxVelocityY *= MathF.Sign(inputVelocity.y); -------> be sure to use MathF (capital F) instad of Mathf, the later is a Unity library and behaves differently from MathF (c# library) currentVelocity.y = Mathf.MoveTowards(currentVelocity.y, maxVelocityY, Time.deltaTime * changeRate); } public void OnMove(InputAction.CallbackContext context) -------> Input System Events { inputVelocity = context.ReadValue(); } public void OnRun(InputAction.CallbackContext context) -------> Input System Events { if (context.started) { runPressed = true; } else if (context.canceled) { runPressed = false; } }
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
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.
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 :)
As always Concise and brilliant explanation! I love these timestamps that you add. Can't Thank you Enough! Definitely Gonnna hit the notification bell.
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
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.
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!
It's saying the video is from Manhattan, but I'm seeing a really sizable area behind you! But you know what, you're one of the few people that deserve it. You're incredible. I appreciate this more than you know, and it kinda blows my mind that Unity can combine animations. The idea that animations can be combined in the first place is just whack.
Never worked with unity or blender and I simply decided to create a character for Risk of Rain 2, and without these videos I'd given up a long time ago, still i have to learn so much...
Maybe it's just on the patreon project files but at 19:28 when you are scrolling through the code, I didn't see mention of locking left and right, just locking forward. That's cool and all just thought it was a weird jump in logic and made me go back and forth a couple of times to catch it.
Also, I think I figured out why Nicky chose the value 2.0f to be the max float value for the animation blend. I'm guessing later when we actually have the character moving in world space that's gonna also be a handy factor for scaling the movement speed with the animation. :-)
I would like you to improve this tutorials adding JUMP animations and it's scripts. Your Knowledge about blendtrees is deep and the edition of your videos is professional. I dont know how many hours you spend producing and editing your videos, but we appreciate it.
Fantastic, please do another video adding an upper body layer (wave, aim etc.) I can't seem to find a way to transition cleanly from one layer to the other
Great explanation. Learned a lot in animations You could use use horizontal axis or vertical axis for key inputs It will make code and if statement less
10:15 I manage to get it all but only failed to setup reset velocity for X axis to 0 when the animation is finished (after acceleration and deceleration)
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? :)
I am having a problem that, when I press the A and D keys, the character doesn't go left and right in the game view, but, it updates in the animator and it also shows working in the little area in the blend tree where you can see the character animate, I don't know why it doesn't work, it only works when I press the W key with the A or D key, otherwise, only the W key works, my code is also running fine, there are no errors and it is an exact copy, please send help.
The code in this part is more complex and it's really hard to follow the explanations and write the code at same time. Had to watch the whole thing again a second time to understand what I was actually doing. Nonetheless I very much appreciate your work, these tutorials are fantastic and you are a great teacher.
when the run button or "shift" isn't held down and the character is running right or left they continue running at walking speed. any fix to blend the left strafe run back into the walking animation for left strafe when the key isn't held down?
I added a backwards walk animation and I cant get it to work to save my life. When I slide the vertical input down I can see the animation working, but I cant make it work with code. I thought I would do the same with "forwardPressed" but opposite. Any help?
Very good tutorial! I have one question though, maybe you can help.I have a 2D blend tree with 4 anim: forward, backward, left and right. If i try to blend between forward and left/right it works, but backward and left/right the character moves the legs in a strange kinda way, like he strafes in the opposite way
I only find a problem in this animation system and it is that when trying to incorporate the animation of walking backwards it is not possible, because of the blocking because it does not allow negative values.
When refactoring for performance, I'd also suggest eliminating unnecessary method parameters like "forwardPressed", "rightPressed", etc in your changeVelocity(...) method. Instead, make those things fields that get updated by a _getInput() method. Why? Because that's more data that has to be pushed on and popped off of the call stack by the CPU. You need those values literally every single frame, so why not make them fields that go in RAM heap rather than data on the stack? Of course, I realize it literally doesn't make a bit of measurable difference in this example project because it's so small, but think about a game that begins to get very large and sophisticated. Yeah, I also realize that a bool is only one byte (8-bits) but I'm saying this should be a general practice in refactoring to keep as much data cached in RAM as possible instead of being pushed on the call stack. ;-)
P.S. -- I subscribed and love your videos! I've been watching the whole series and almost have the whole animation system figured out now, in a matter of hours. Other people's videos were confusing me because they either didn't know or just neglected to explain what different editor options do, and you finally made it clear to me how every single feature works. May the gods smile upon Nicky! XD
@@iHeartGameDev Can i ask you a question? Iam new to unity. For me with a ~25% english knowledge sometimes its hard to understand what a script command exactly reference to. But in my opinion i have to know this if i want to learn C#. Can you Explain me, whats the difference between the "Animator" and the "animator"? I know with the "Animator" the Component is meaned, but whats the "animator"? Thats the only think i dont get haha... every think else i can comprehend.
@@iHeartGameDev Man U are the best ! Thanks 🙏🏻 +1 Sub ❤️
2 года назад
I had error "two or more of the positions are too close to each other" I have 5 anim idle,forward backward ,left ,right positions (0,0),(0,1),(0,-1),(-1,0),(1,0) and I tried increase these numbers but does not work and even freeform directional dosent blend correctly
so my bled tree works perfectly but how do i hook these up to my controls? my player movement scrip works perfect. can walk with {w,d,s,a} but my animations wont play when i move. only when i move the velocity peramiters on my bled tree in play mode
i got a problem here ... i used the freeroam and it doesnt bledn the running animation in , the others work fine but the running animation just stay stuck there
Hi I try to blend crouching forward and crouching left, right animations with a variable from -2 to 2, my problem is the character play seem good when blend forward + right but forward + left is not (2 legs step together), what wrong with me, do I need a step to sync ?
I have a question, how it's posible to figure out all this code from yourself? I mean, i probably would never be able to create a code like this by my own🤷🏻♂️
Really perfect video ! Currently my character doesn't move, like he does all the animations and changes direction but no travel... how can I do about the travel ? does anyone have a video that explains this part? thanks :)
Man, that background music has to go. I very repetitive and after a few minutes I found distracting. This is the first video of yours I watched and I was impressed bc you explained why 2d simple would not work before continuing.
If we press A and D together the animations get wierd i tried to fix it by if(rightPressed && left pressed) { VelocityX = 0.0f; } But I am not able to decelerate properly can anyone help me
followed your tutorials, everything works well. how do you get this set up to move in the world (along the z and x axes)? Do I have to back track and use root motion or is there a character controller for this?
@@iHeartGameDev I managed to get it working with root motion by using your other tutorial. Thank you for answering so quick, these tutorials are really once in a lifetime type of quality. Keep it up.
Your video is awesome and it really helped me a lot but i have one issue. Whenever i drag both velocity x and z values all tha way up to 2 the animations are not blended correctly. I downloaded them from mixamo as you showed in your previous videos. Any ideas on how to fix it? Nevermind it was probably a bug. I reimported the animation and it worked