Help with Turn Animations

Hi everyone and thanks in advance for any help you could provide. I need to do something basic: I need to know how exactly “turn left and right” animations for walking and standing (for the first step) are made for a 3d humanoid character that moves in space using NavMesh. The root of the character rotates with the NavMesh, so how are these animations made in order to work? (links or examples would be very useful!). Thanks!!!

Create a blendtree for start walking that has animations at -180 (turn all the way around left) -90 (turn to left) 0 (start walking forward) 90 (turn to right) 180 (turn all the way around right). Then you just crossfade to that state from code and set the blendtree’s parameter to the angle you want to turn (eg set turn angle to 135 and then crossfade to state to turn character most of the way around to the right but not fully turned around). Usually you won’t call this start walking pivot state if the desired turning angle is under something like 60 since you can just quickly turn the character via script and it’ll look natural enough. You also want to put in some checks like make sure you can only call the state once every second or so in case player is spamming the movement controls.

Hope that all makes sense.

1 Like

Thanks for your reply! The blendtree setup is very useful, and I’ve been studying it, but what I’m trying to understand is how to create the ‘turn right’ and ‘turn left’ animations while walking in a 3D application, considering that the rotations are managed by the root in Unity. I need to achieve an smooth walking. Do you have an example which I could analize? I watched your channel and I loved your content! Thanks again!

I don’t usually make animations, but I use the Movement Animset Pro by Kubold from the Asset Store and the start walking L/R 90/180 animations look like this: https://youtu.be/3LPkc_vD9uM?si=yrIvwUl-a6NDQioF&t=37