VECTOR* temp_vec=(x=0;y=0;z=0;}
function camera_follow(ENTITY* ent)
{
vec_rotate(camera.x,ent.pan); // rotate the camera position with the player
vec_set(camera.pan,vector(ent.pan,-10,0)); // look in player direction, slighty down
while(1)
{
mywizard.pan = camera.pan;
// you might need to toy with the values in this next line:
vec_set(temp_vec,vector(50,-100,60)); // camera position relative to the player
vec_rotate(temp_vec,camera.pan);
vec_set(camera.x,temp_vec);
vec_add(camera.x,ent.x); // add player position
wait(1);
}
}