Hm, you are aware that you are not actually zooming but scaling two objects at one of their axis?

"Zooming" in the sense of filming or photographing is when you change the camera.arc by mickey.z.

In game "zooming" often refers to moving the camera nearer or farer away:


VECTOR* temp = {x=0;y=0;z=0;}
var camera_distance = 100;

function zoom()
{
while(1)
{
vec_for_angle(temp, camera.pan);//translates an angle into a direction
vec_scale(temp, camera_distance);//sets a distance to the direction
vec_add(temp, camera.x);//places the directed distance to the cameras posisiotn
camera_distance += (mickey.z*10*time_step);
if(mouse_left){camera.pan += mouse_force.x;}
wait(1);
}
}


Last edited by Pappenheimer; 05/03/10 19:35.