If i understand your question, here's some code from the khmovement tutorial that does just that!


FUNCTION handle_movement() {
temp.x = -1000;
temp.y = 0;
IF (key_w == 1) { temp.x = camera.pan; }
IF (key_s == 1) { temp.x = camera.pan + 180; }
IF (key_a == 1) { temp.x = camera.pan + 90; }
IF (key_d == 1) { temp.x = camera.pan - 90; }
IF (temp.x != -1000) { temp.y = 15 * time; }
my.move_x = fcos(temp.x,temp.y);
my.move_y = fsin(temp.x,temp.y);
c_move(my,nullvector,my.move_x,use_aabb | ignore_passable | glide);
}


hope that helps...

Last edited by RyuShinji; 03/21/08 14:58.