FANDOM


code:

starter move_camera()

{

camera.arc=75;

camera.clip_near=20;

camera.clip_far=24000;

var cam_ang[3];

var cam_dist=1000;

cam_ang.pan=180;

cam_ang.tilt=30;

cam_ang.roll=0;

while(!p_vehicle){wait(1);}

while(1)

{

if(mouse_left)

{

cam_ang.pan-=10*mouse_force.x;

cam_ang.tilt=clamp(cam_ang.tilt-(10*mouse_force.y),5,80);

}

else

{

cam_ang.pan=(p_vehicle.pan-180);

cam_ang.tilt=30;

}

cam_dist=clamp(cam_dist-mickey.z,200,2000);

camera.x=p_vehicle.x+cos(cam_ang.pan)*(cam_dist*cos(cam_ang.tilt));

camera.y=p_vehicle.y+sin(cam_ang.pan)*(cam_dist*cos(cam_ang.tilt));

camera.z=p_vehicle.z+sin(cam_ang.tilt)*cam_dist;

vec_set(temp,p_vehicle.x);

vec_sub(temp,camera.x);

vec_to_angle(camera.pan,temp);

wait(1); }

}


By: Braxton Johnston

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.