I have something like this in my game:
Code:
vec_set(temp.x,vector(mouse_pos.x,mouse_pos.y,camera_dist));
		vec_for_screen(temp,camera);
		temp.z = 0;
		vec_sub (temp.x, you.x);
		vec_to_angle (my.pan, temp); // rotate it towards the target


camera_dist is the distance from the player to the camera, in my game: var camera_dist = 700;