Originally Posted By: Superku
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!


Thanks! Basically, I need the camera to follow the object both when it moves and when it tilts/pans/rolls, kind of like in the wizard shooter in the tutorial (workshop24 I think) but not just the pan angle.

Seems a bit confusing, eh?

Thanks again!