Download

Turn in place animation

Hi everybody!
I’m setting up my character using root motion and I want that when the camera turn around the character more than 90 degrees, the character turn right or left watching in the same direction of the camera.
My character turn in place if I rotate the camera, but the problem is that when he finishes the animation, he returns to the starting idle position.
I’m using root motion in every animation, using “anim first frame” as root motion root lock, so I don’t know why this is happening.
I can’t use “ref pose” because if I use that, my character is turned by 90degrees on the x axis in all animations.
I think is something linked with the transition between my “movement blendspace” and the turn animations.
Indeed I think that when he came back to “movement blendspace” he “restart” from the position he was before entering the turn animation.
So, how can I tell him that when he finishes the turn animation he MUST stay in that position?
I’m really getting mad so if somedy can help me will be awesome.

As a tip if you are using root motion you should add an arrow to the character BP linked to the root bone

Because

Direction control is controlled by the direction that the root is facing and since the root does not account for the aim offset it’s always facing forward or in the direction that the arrow would be facing so if you want the player to come out of the turn then the player will need to exit the state in the direction of the arrow…always.

The dirty trick while at idle is to do the foot stomp turn as a full body yaw turning the root at the same time but if you want the aim offset to turn you will need to transfer the current yaw to the root and offset the hips by hips - yaw

Be warned though RM has replication and network issues

Hi FrankieV and thank you for your answer.
So the character starts moving in the direction that arrow is facing, right?
I have an arrow component as a child of the capsule component.
What happen in my character’s BP is this:

https://s14.postimg.org/feiwa3bot/Turn_BP.jpg

By default I’m using controller rotation yaw only if there are an input (like forward and strafe). If I’m idle, controller rotation yaw is set to false, so I can rotate around the character with the camera.

We have to make that the arrow rotate with the character right?
So if I try to “use controller rotation yaw” then “add controller yaw input” (axis value = 90) and then turn off again “use controller rotation yaw”, after or before setting to true the bool animation, the character go crazy and start rotating around him for the time of the delay.
If I don’t use that delay, the turn animation never plays cause the bool go false instantly.
So is there a way to rotate the arrow with the turn animation? I’m missing something?

Better to link the arrow to the character models root bone as the attached to socket.

Things get a bit complicated when playing around with root motion as there is no “real” tutorials or white papers on how to do a full RM set up but you can follow along with the learning curve here. :wink:

https://forums.unrealengine.com/showthread.php?120595-Advanced-Character-Movement-BP-Setup-Help

Yeah I noticed that there aren’t so many tutorials…
Anyway for now my character does at most everything I need…
My only problems are this turn animation and now… Jump…

Can you explain me how to link the arrow to the character root bone?
Have I to made a socket on his root bone and then on begin play link the arrow to that socket?

I watched your video and it’s awesome. I set up a lot of things in a better way after watching it.
Anyway I still can’t have this turn in place animation and jump animation…
Please guys if somebody can help me will be really awesome. I’m about to finish my character and I need this 2 things…

Well turns are like any other root motion in that whatever direction the arrow is pointing the player will come out of the turn in that direction. Just wire a key as the turning event and if root motion is applied then it should turn.

Jumping is tricky and have not yet figured it out. There is a catch 22 in that jumping is not really a locomotion state but a physics event of the player always being in a state of falling so when triggered the RM runs as it should but the jump tends to look more like a hop due to physics pulling the capsule down at the same time. I have a couple of ideas but the best would be to do jumps as normal with out the use of root motion

Hi Frankie…
So I tried the turn animation on another skeleton (beta skeleton of mixamo).
It seems better cause when he finishes the animation he stays in the final position… Anyway if I give him another input he goes back to the starting position…
Anyway now I have a bigger problem:
Using root motion on that skeleton, when I walk or run or everything, he stars walkin but he don’t stay “anchored” to the terrain… It seems that he starts waving left and right…
If I process root motion in the animation blueprint editor, he starts walking in the air…
I’m really going mad…