I assume you want the camera to stay behind the player, as the player rotates, right?

To do this you have to use some trigonometry.
Code:
camera.x = my.x - 150 * cos(my.pan);
camera.y = my.y - 150 * sin(my.pan);



Set the 150 to how far you want the camera to be from the player.
Not sure if you need an explanation of how this works, but here.