How to rotate a player pawn on z axis?

I’m trying to make my player pawn rotate on the z axis towards the direction its moving (only left/right on x axis). Making this work is simple for a player character but a player pawn doesn’t seem to work in any way I’m doing it. I’ve been trying to control the player controller, the mesh and the player pawn, only the player pawn seems to almost be correct. However when it is moving negative on x axis it behaves crazy and flings the pawn away to the right.

Any ideas how to fix?
The image is the current solution with the player pawn rotation being controlled.

get velocity>make rot from x>set actor rotation.this all should do in tick.if you’re pawn have jump function or move up and down sometimes.then you might want to break the result of the make rot from x,and only take z value.