Player Walking Animation – Blend Tree
Day 019 #PanicRoom
Day 084 #100DaysOfGameDev
Day 096 #100DaysOfCode
![](https://i0.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/05/2020-05-16_notepad_script_PlayerMovement.png?resize=409%2C187&ssl=1)
With the 8-axis player movement animations completed it was time to import them into Unity and create a custom Blend Tree to have the player move the way he should. It also meant tweaking the PlayerMovement script a little bit as well to set up the Parameters the Animation State Machine would need to see in order to work properly.
![](https://i0.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/05/unit-circle.png?resize=359%2C276&ssl=1)
It took a while to get all the animation states entered in, but once I did it was a simple matter to add them to the blend tree and tweak out the positions where each state should trigger. A useful tool was the diagram showing how to calculate the position of a point on a grid 45-degree out from origin at a set radius. For me, this ended up being about 0.701.
![](https://i2.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/05/2020-05-17_Unity_player_animations.png?fit=800%2C421&ssl=1)
![](https://i1.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/05/2020-05-17_Unity_player_blend_tree.png?fit=800%2C409&ssl=1)