Answers for "how to rotate a box to mouse in pygame"

3

how to rotate image through mouse in pygame

# if you want to find the angle the mouse position is from the center
#heres the formula
angle = 360 - math.atan2(pos[1] - 300, pos[0] - 400) * 180 / math.pi
Posted by: Guest on April-08-2021

Code answers related to "how to rotate a box to mouse in pygame"

Python Answers by Framework

Browse Popular Code Answers by Language