title: Rotate camera relative to a point
body: <p>I need to rotate the camera around a player from a third person view. (Nothing fancy).</p>
  
  <p>Here it is how I try it:</p>
  
  <pre><code>// Forward, right, and position define the plane - they have x,y,z components.
  
  void rotate ( float angle, Vector interestPoint )
  {
      Vector oldForward ( Forward );
  
      forward = forward * cos(angle) + right * sin(angle);    
      forward.Normalize();
  
      right = forward.CrossProduct ( up );
      right.Normalize();
  
      position = ( position + old_forward * position.Distance( interestPoint ) ) - (forward * position.Distance( interestPoint ) );
  
      this-&gt;angle += angle;
  }
  </code></pre>
  
  <p>The problem is that if, let's say just do turn left a lot, the distance between the object and the camera increases.</p>