how to get the angle of mouse from the center

38

how to get the angle of mouse from the center -

# if you want to find the angle the mouse position is from the center
# heres the formula
angle = 360 - math.atan2(pos[1] - (half of screenheight), pos[0] - (half of screenwidth)) * 180 / math.pi

Comments

Submit
0 Comments