Walking Animation Feet Shimmy When Key Unpress

How can I make the feet not spaz out out like that when I unpress a walk key? I want it nice and smooth, and this is far from! Thanks :smiley:

A couple things you can do to fix. First - turn on foot IK in the inspector. This will make the feet lock to the ground so they don’t slide all over the place.

Second - if you want the transition to look better without editing or adding animation - you can turn on/off ‘has exit time’ on the transition. This will make the animation complete the cycle before exiting to the idle pose. But this will make the controller feel like there is lag in the animations (less responsive).

Third Option - If the player is going to be making short jerky movements like you are doing in the video (similar to stealth movement in games like metal gear or splinter cell) I would set up the animation controller differently. The changes I would make would be to have the animations pause when the directional key is released instead of the state machine transitioning back to idle pose. By having the animation pause until the player continues to push the directional key the animation will look smoother/more realistic. The movement setup of the games mentioned above usually transitioned the animation state back into a crouching/standing idle after several seconds of player inactive input. So the character is not always locked into the paused animation state.

Fourth Option - Provide additional animations for the state machine that are smaller and allow for nicer looking transitions out of a walk cycle that has only played half way through.
This is an advanced set up and is not something I would recommend with out two experienced developers (one programmer, one animator) working on getting the controller set up correctly.
By breaking down the animation cycles into smaller segments left foot walk, right foot walk, left foot transition to idle, right foot transition to idle, etc etc - a developer can have finer control of a characters transitions from one state to the other. The trade off is the animation cycles have to be created with this in mind, and the state machine will be a lot more complex - and more difficult to get set up correctly. But the results are better - once the state machine is perfect. This is a standard animation flow for fighting games, or 3rd person stealth games, or other games that require minute control of the character - with transitions set up to transition out of any cycle into any cycle - and still look clean and smooth.