Rotate Upper Body/Head with mouse

Hi guys!

I want my character to look in the direction the mouse is pointing.

For the Yaw, it works perfectly, but the Pitch doesn’t work quite right.

When the Character’s rotation (yaw) stays at the initial value, it works.
But if the character rotates (yaw), looking up and down doesn’t work correctly.
I’m getting the Camera Rotation, and subtract the character’s rotation from it (so the character looks always to the mouse)

As you can see, the character is looking down when I want to look up and the character is rotated about 180°
Does someone know a solution for this?

can you invert the input for pitch? that may work