I have a problem i been following Kingdom Hearts Movement Tutorial.
Its a good Tutorial by the way.

I learned a few things form it, but now im stuck a bit.
I was working on my own idea of movement then i got stuck.

If i press A or D on the keyboard the player dont move left or right?,but it can move forward and backwards with W and S Keys.
I need my camera to stay at the back of the player, its not going to move by mouse later on.

Ive looked at my script for a while and i think its to do with c_move but im not sure because im new at this.

Code:
 ACTION player_action {
my.shadow = on;
WHILE (1) { //the main loop
handle_movement();
handle_camera();
wait(1);
}
}
FUNCTION handle_movement() {
temp.x = 0;
temp.y = 0;
IF (key_w == 1) { temp.y += 5; }
IF (key_s == 1) { temp.y -= 5; }
IF (key_a == 1) { temp.x -= 5; }
IF (key_d == 1) { temp.x = camera.pan - 90; }
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);
}
FUNCTION handle_camera() {
vec_set(camera.x,vector(my.x + fcos(my.pan,-380),my.y + fsin(my.pan,-200),my.z +
120)); //place the camera behind the player
}



Please help me make left and right work.
Thanks




Last edited by FireArm; 02/11/08 15:39.