Legacy GM Sprite Face The Mouse

N

NotMe

Guest
I got 4 sprites one for up on for down one for left and one for right i wanna the sprite to face the mouse
 
N

NotMe

Guest
nvm i found out the way i want it to work after a long search here is the code
Code:
mx=mouse_x;
my=mouse_y;

switch ((point_direction(x,y,mx,my)+45) div 90) {

case 1: face = UP; break;
case 2: face = LEFT; break;
case 3: face = DOWN; break;
default: face = RIGHT; break;

}
 
Top