title: Having an object revolve and face a center point
body: <p>I'm working on a game where the player controls a space ship that circles clock/counterclockwise around a center point while shooting projectiles coming from said point. I have everything written, although actual placement is slightly off and rotation isn't working.</p>
  
  <p>For movement, I have:</p>
  
  <pre><code>if (code==KeyEvent.VK_LEFT) {
              trans.setToIdentity();
              trans.translate(player.x-10, player.y-10);
              player.moveLeft();
                              //trans.rotate(?)
              System.out.println(player.x + " " + 
                                 player.y + " " + player.dX + " " + player.dY);
  }
  </code></pre>
  
  <p>Where <code>trans</code> is an AffineTransform, <code>player.moveLeft()</code> changes the player's coordinates to a point on the circle (working as expected, uses sin/cos/theta, simple trig). When I draw an object with <code>Graphics2D</code> it follows the coordinates, but when I use an imported image it trails by several (~25) pixels. Since I have an angle, x, y, and radius, what can I use with <code>AffineTransform</code> to rotate the image around its center point and have it constantly face the center point?</p>