I am making a Joystick and am having problems with getdir.
Basically I have this.
PHP Code:
player.dir = getdir(Joystick_Controller.x + 35 - Joystick_Pointer.x + 10, Joystick_Controller.y + 35 - Joystick_Pointer.y + 10);
Joystick_Controller is the joystick background/container.
Joystick_Pointer is a small dot at the cursor.
Is there something I am doing wrong?