Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get the angle of mouse from the center formulae

# 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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #angle #mouse #center #formulae
ADD COMMENT
Topic
Name
4+4 =