I created a camera that follows behind the player using this code:

camera.x = snowman.x - 250 * sin(snowman.pan);
camera.y = snowman.y + 250 * cos(snowman.pan);
camera.pan = snowman.pan-90;
camera.z = snowman.z + 180;


This camera code works fine for the first level and there are no problems. When I load my second level, the camera does not stay nicely behind the object, but rather "lags" as the object moves forward faster than the camera. Any ideas?


"Pow! You are dead! Not big suprise!" -Heavy