// ...
// tempFocus is the position the camera's looking at
vec_set(tempFocus, camFocus);
// setting camera position and some settings
vec_set(camera.x, vector(500,0,400));
camZoom = 500;
camAngle = 350;
// desired camera position
temp.x = tempFocus.x + camZoom * cos(225);
temp.y = tempFocus.y + camZoom * sin(225);
temp.z = camera.z-150;
while(counter < 350)
{
vec_lerp(camera.x, camera.x, temp.x, camFactor);
// camera should face the focus point
vec_set(temp2, tempFocus.x);
vec_sub(temp2, camera.x);
vec_to_angle(camera.pan, temp2);
// Factor for the interpolation.
camFactor += 0.005 * time_step;
// counter to determine the length of the "camera movement"
counter ++;
wait(1);
}