}
}
// A camera is hunting a target and turns with them. The target is always in the middle of the views
var cam_dist[3] = 0,-200,60; // xyz Distance of the camera towards the target
function chase_camera(target)
{
my = target; // The target Entity
// calculate the camera view's direction angle to the target
var cam_ang[3]; // direction angle of the camera to the target.
vec_diff(temp,nullvector,cam_dist);
vec_to_angle(cam_ang,temp);
cam_ang.roll = 0; // roll didn't change vec_to_angle
// permanent updating of the camera's position and angle
while (1)
{
// place the camera at the right position to the target
vec_set(camera.x,cam_dist);
vec_rotate(camera.x,my.pan);
vec_add(camera.x,my.x);
// Set the camera angles to the camera view direction
vec_set(camera.pan,cam_ang);
// and rotate it about the target angle
ang_add(camera.pan,my.pan);
wait(1);
}
}
این متن اسکریپتش بود که خود من ساختمش .... !
تمام قوانین فیزیکی مانند قوانید :
شتاب .... جاذبه .... اینرسی ... سیستم دور ( نسبت به سرعت ) و .... !
در روز های آتی آموزش اسکریپتی که نوشتم برای شما را می دم !