【发布时间】:2021-03-11 21:55:38
【问题描述】:
我正在尝试旋转图像,使其始终面向鼠标,并且我注意到图像大小正在发生变化。我正在尝试排除故障,但没有运气。我想要一些建议。
这是我正在使用的:
ang = 360 - math.atan2(mousey - 540, mousex - 960) * 180 / math.pi
rotcircle = pygame.transform.scale(pygame.transform.rotate(redcircle,ang), [100, 100])
rect = rotcircle.get_rect(center=(960,540))
screen.blit(rotcircle,rect)
【问题讨论】:
标签: python pygame resize image-rotation