Answers for "how to get the angle of mouse from the center"

4

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
Posted by: Guest on April-08-2021

Code answers related to "how to get the angle of mouse from the center"

Python Answers by Framework

Browse Popular Code Answers by Language