Hello everyone. What I’m trying to do is implement a very rudimentary turn in place based off of Lyra’s implementation.
Essentially, what I am doing is this: I have bUseControllerRotationYaw = true and as the player rotates their capsule, I keep track of the yaw offset relative to the direction their character is looking and then rotate the root bone by that offset so that the character is always looking straight ahead. When their yaw offset grows past an arbitrary value (50.0f in my case), the turn in place animation kicks in and a curve attached to the turn animation reduces the yaw offset by 90.0f over the course of the animation. As the turn in place animations remaining rotation approaches zero, my state transitions to a TurnInPlaceCooldown state that can either transition back to idle or to another turn if the yaw is still larger than 50. (Basically, exactly as it’s done in Lyra). The blend logic between the TurnInPlace and TurnInPlaceCooldown states is set to inertialization with a default 0.2s blend time. Then, in my Anim Graph, I hook up the inertialization node right before I rotate my root bone by the yaw offset, and the rotate root bone feeds right into the Output Pose node.
Locally, everything works fine. It’s only when I start using a dedicated server or a listen server that things start to act weird, and the issue only appears on the other client’s screens (the screens not being locally controlled by the client who is turning). For example, the character is looking forward and looks more than 50 degrees to the left. Immediately after the state transition to the TurnInPlace state, the character mesh rotates 90 degrees to the right, snaps back to facing forward, and then does the turn left animation. I’ve attached a video to show what’s happening.
I’m almost positive it has something to do with the inertialization blend I’m doing for the transitions between TurnInPlace and TurnInPlaceCooldown, because when I change the blends back to standard the issue goes away. I’ve also noticed that the effect is most pronounced when the user that is turning performs the turn very quickly (if the yaw slowly crosses over 50 it may look fine, but if the player quickly flicks their mouse for a quick 180 degree turn it is often times very noticeable). I’m attaching a video showing my problem, as well as a few images to give context to what is going on. If anyone could steer me in the right direction, I’d be super grateful, and if I haven’t given enough information just let me know and I’d be glad to try to further explain it. Cheers.
For some reason, the forums won’t let me attach a video so I put it on streamable instead. If you focus on the screen on the left, you’ll see the problem right as the character begins to turn: