Make a 2d character rotate towards the mouse

I am doing a top down 2d game and I wanted the sprite of my character (or whole character if possible) rotate towards the mouse.

Would it work to use the Yaw only of a Look at Rotator that points from ylur character to the mouse position? You can convert the mouse position to world coordinates. Just leave off the pitch and roll. Would that work?