Lets assume that everything is done in 2d.
The camera is right above the player and is looking down at him.
Now, I want to rotate the player according to the mouse cursor, so he is alway looking 'at the mouse cursor'. This is simple - good, old atan2 (player is always in the center of the screen):
float f1 = Input.mousePosition.x - Screen.width / 2.0f;
float f2 = Input.mousePosition.y - Screen.height / 2.0f;
float angle = Mathf.Atan2(f1, f2);
So, rotation of the player is: (0.0f, angle, 0.0f) and its works fine.
But now I want to add camera rotation based on the same rules, so rotation for the camera should be: (Mathf.PI / 2.0f, angle, 0.0f) and here the problem appears... It looks like the camera is rotating faster that the player, or the player is slower that the camera... I suppose that is an illussion from combining two rotations together (for the camera and the player), but I can't find a solution to solve this problem.
Please, help