Top Down Set Character Rotation

Hi Guys,
I’ve managed to set a top down character where with the left joystick I set the character’s movement (walk/run) and with the left joystick I set the character’s rotation (so he can walk one direction and look to another).
The thing is that I added buttons to rotate the camera and the character’s rotation is not being calculated according to the camera rotation (for example, if I move the camera 90 degrees to the right, then looking up with the joystick will turn the character to the left).
How do I calculate the joystick’s input according to the camera rotation in this case?