How to turn the sprite in pygame while moving with the keys
问题 So basically ive been hoping it would be possible to effectively turn your sprite while moving it around with W A S D . Any ideas because im certainly stumped, thanks! 回答1: See How do I rotate an image around its center using PyGame? for rotating a surface. If you want to rotate an image around a center point ( cx , cy ) you can just do that: rotated_car = pygame.transform.rotate(car, angle) window.blit(rotated_car, rotated_car.get_rect(center = (cx, cy)) Use pygame.math.Vector2 to store the