Move mouse as if the camera never rotated.

Hi, I’m making a first person shooter, and I was able to get my character to lean left and right, but the mouse also moving left and right at a tilt to aim is burdensome to the player. I was wondering how i can make it where the camera is rotated along the Z-axis, but have the mouse still move as if the camera was straight (not leaning). Rainbow Six Siege does implement this and it has very positive feedback.

i just found out that rainbow six siege does NOT do this, please disregard this post, i will try to find a mod to delete it