angle = direction(xscreen, yscreen, xmouse, ymouse);
directional_velocity = 20;
As the coordinates xmouse and ymouse are given related to the screen, we have to use xscreen and yscreen; these are the coordinates of the actor related to the screen.
Users browsing this forum: No registered users and 1 guest