Alien Swarm Camera and Crosshair trouble

I am working on a top down shooter similar to Alien Swarm in its control and camera scheme.

WASD moves the player in fixed directions regardless of orientation.

The player rotates to face the crosshair location.

The camera also rotates to give emphasis to the region the player is aiming towards.

However these last two points are giving me considerable trouble.

Using screen positioning for the crosshair results in a feedback loop with the camera causing the camera to nearly endlessly spin around.

Moving the crosshair location to world space fixes the loop, but results in up and down movement being skewed as the crosshair moves from the farthest point to the closest point. I assume this is due to the camera frustrum being narrower the closer you get to it.

Does anyone have any suggestions for how to accurately move a crosshair the player is looking at without causing the camera to spin in response?

EDIT: Turns out I’ve been working too long on this and was a bit confused. Alien Swarm is not rotating the camera and neither am I. I am trying to translate the camera similar to how Alien Swarm translates the camera in order to emphasize a given direction.

Well, I’d suggest you to not rotate the camera to the crosshair’s position. Instead do it like:

  • Horizontal mouse movement (which is Input.GetAxis(“Mouse X”)) only rotates the camera.
  • Vertical mouse movement moves the crosshair along the vertical axis in the center of the screen.

This will be some sort of a hybrid of fps and isometric controlls.

But I’d suspect there will be one problem: it will be a bit uncomfortable for a player to play with a camera spinning around making him dizzy. In games like Alien Swarm the camera is places in a fixed position for several reason. One of the major ones is that it makes easier for a player to concentrate.