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.