Quote:
Originally posted by Python523
for the direction, calculate the x and y distance between the player and the point you click at then use the function stefan added (getdir) to change the players direction
dx = mousex-playerx;
dy = mousey-playery;
playerdir=getdir(dx,dy);
|
Why not just do playerdir = getdir(mousex-playerx,mousey-playery);??