Quote:
Originally Posted by Gunderak
It now works, but only for the directions 2 and 3....
|
Watch your +s and -s
PHP Code:
player.dir = getdir((Joystick_Pointer.x + 10) - (Joystick_Controller.x + 35), (Joystick_Pointer.y + 10) - (Joystick_Controller.y + 35));
is not the same as
PHP Code:
player.dir = getdir(Joystick_Pointer.x + 10 - Joystick_Controller.x + 35, Joystick_Pointer.y + 10 - Joystick_Controller.y + 35);
is not the same as what you have in the OP.