action object_with_camera() {
VECTOR o_speed;
while(1) {
my.pan += (key_a-key_d)*10*time_step;
o_speed.x = (key_w-key_s)*20*time_step;
o_speed.y = 0;
o_speed.z = -c_trace(my.x,vector(my.x,my.y,my.z-500),IGNORE_ME | IGNORE_PASSABLE);
c_move(me,o_speed,nullvector,GLIDE);
camera.x = my.x-300*cos(my.pan);
camera.y = my.y-300*sin(my.pan);
camera.z = my.z+150;
camera.pan = my.pan;
camera.tilt = -20;
wait(1);
}
}
Should work, untested.
EDIT: When reading your post a second time I'm not sure if I understood you correctly!?
BTW: Welcome to the gamestudio forums!
Last edited by Superku; 05/16/10 23:05.