Answers for "how to rotate to your mouse 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

Python Answers by Framework

Browse Popular Code Answers by Language