Published
- 1 min read
Python Pygame Angle To Mouse
The solution for this is noted below
Python Pygame Angle To Mouse
Solution
angle_to_pointer = math.degrees(math.atan2(objectY-mouseY, objectX-mouseX))+180
# Replace objectX and object Y with the x and y of your surface or rect.
Try other methods by searching on the site. That is if this doesn’t work